Skip to content
Permalink
Browse files
8210802: temp files left by tests in jdk/java/net/httpclient
Reviewed-by: stuefe
Backport-of: 1adaa50
  • Loading branch information
RealCLanger committed Aug 13, 2021
1 parent de35864 commit b9c24c34961976bec38f6ea0c7af960106b042da
Showing with 2 additions and 1 deletion.
  1. +2 −1 test/jdk/java/net/httpclient/EchoHandler.java
@@ -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 @@ public void handle(HttpExchange t)
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();

1 comment on commit b9c24c3

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on b9c24c3 Aug 13, 2021

Please sign in to comment.