mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-20 20:00:28 +00:00
8210802: temp files left by tests in jdk/java/net/httpclient
Reviewed-by: chegar, clanger
This commit is contained in:
parent
d70db363eb
commit
1adaa503bb
@ -40,6 +40,7 @@ import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class EchoHandler implements HttpHandler {
|
||||
static final Path CWD = Paths.get(".");
|
||||
public EchoHandler() {}
|
||||
|
||||
@Override
|
||||
@ -53,7 +54,7 @@ public class EchoHandler implements HttpHandler {
|
||||
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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user