test/jdk/java/net/httpclient/EchoHandler.java
changeset 51778 300523d8b7b3
parent 49765 ee6f7a61f3a5
child 52121 934969c63223
--- a/test/jdk/java/net/httpclient/EchoHandler.java	Mon Sep 17 23:35:00 2018 -0400
+++ b/test/jdk/java/net/httpclient/EchoHandler.java	Tue Sep 18 13:24:25 2018 +0800
@@ -40,6 +40,7 @@
 import java.util.logging.Logger;
 
 public class EchoHandler implements HttpHandler {
+    static final Path CWD = Paths.get(".");
     public EchoHandler() {}
 
     @Override
@@ -53,7 +54,7 @@
             map1.add("X-Hello", "world");
             map1.add("X-Bye", "universe");
             String fixedrequest = map.getFirst("XFixed");
-            File outfile = File.createTempFile("foo", "bar");
+            File outfile = Files.createTempFile(CWD, "foo", "bar").toFile();
             FileOutputStream fos = new FileOutputStream(outfile);
             int count = (int) is.transferTo(fos);
             is.close();