test/jdk/java/net/httpclient/HttpEchoHandler.java
branchhttp-client-branch
changeset 56300 13a2ec671e62
parent 56089 42208b2f224e
child 56369 24a8fafec3ff
--- a/test/jdk/java/net/httpclient/HttpEchoHandler.java	Tue Mar 13 20:17:12 2018 +0000
+++ b/test/jdk/java/net/httpclient/HttpEchoHandler.java	Wed Mar 14 09:01:15 2018 +0000
@@ -40,6 +40,8 @@
 import java.util.logging.Logger;
 
 public class HttpEchoHandler implements HttpHandler {
+    static final Path CWD = Paths.get(".");
+
     public HttpEchoHandler() {}
 
     @Override
@@ -53,7 +55,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();