--- a/test/jdk/java/net/httpclient/SmallTimeout.java Tue Feb 06 15:34:08 2018 +0000
+++ b/test/jdk/java/net/httpclient/SmallTimeout.java Tue Feb 06 16:07:43 2018 +0000
@@ -34,7 +34,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.LinkedBlockingQueue;
import static java.lang.System.out;
-import static jdk.incubator.http.HttpResponse.BodyHandler.discard;
+import static jdk.incubator.http.HttpResponse.BodyHandler.replace;
/**
* @test
@@ -92,7 +92,7 @@
final HttpRequest req = requests[i];
CompletableFuture<HttpResponse<Object>> response = client
- .sendAsync(req, discard(null))
+ .sendAsync(req, replace(null))
.whenComplete((HttpResponse<Object> r, Throwable t) -> {
Throwable cause = null;
if (r != null) {
@@ -142,7 +142,7 @@
executor.execute(() -> {
Throwable cause = null;
try {
- client.send(req, discard(null));
+ client.send(req, replace(null));
} catch (HttpTimeoutException e) {
out.println("Caught expected timeout: " + e);
} catch (Throwable ee) {