Skip to content

Commit b9c24c3

Browse files
committed
8210802: temp files left by tests in jdk/java/net/httpclient
Reviewed-by: stuefe Backport-of: 1adaa50
1 parent de35864 commit b9c24c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/jdk/java/net/httpclient/EchoHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import java.util.logging.Logger;
4141

4242
public class EchoHandler implements HttpHandler {
43+
static final Path CWD = Paths.get(".");
4344
public EchoHandler() {}
4445

4546
@Override
@@ -53,7 +54,7 @@ public void handle(HttpExchange t)
5354
map1.add("X-Hello", "world");
5455
map1.add("X-Bye", "universe");
5556
String fixedrequest = map.getFirst("XFixed");
56-
File outfile = File.createTempFile("foo", "bar");
57+
File outfile = Files.createTempFile(CWD, "foo", "bar").toFile();
5758
FileOutputStream fos = new FileOutputStream(outfile);
5859
int count = (int) is.transferTo(fos);
5960
is.close();

0 commit comments

Comments
 (0)