http-client-branch: (WebSocket) CompletableFuture -> MinimalFuture http-client-branch
authorprappo
Wed, 22 Nov 2017 11:30:24 +0300
branchhttp-client-branch
changeset 55850 1e2fa7c503c1
parent 55849 ad404eb1c8c1
child 55851 0bd10b7df2d2
http-client-branch: (WebSocket) CompletableFuture -> MinimalFuture
src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/WebSocketImpl.java
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/WebSocketImpl.java	Tue Nov 21 20:38:12 2017 +0000
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/internal/websocket/WebSocketImpl.java	Wed Nov 22 11:30:24 2017 +0300
@@ -63,7 +63,7 @@
 
 import static java.lang.String.format;
 import static java.util.Objects.requireNonNull;
-import static java.util.concurrent.CompletableFuture.failedFuture;
+import static jdk.incubator.http.internal.common.MinimalFuture.failedFuture;
 import static jdk.incubator.http.internal.common.Pair.pair;
 import static jdk.incubator.http.internal.common.Utils.permissionForProxy;
 import static jdk.incubator.http.internal.websocket.StatusCodes.CLOSED_ABNORMALLY;
@@ -304,7 +304,7 @@
         }
         CompletionStage<?> readyToClose = signalClose(statusCode, reason);
         if (readyToClose == null) {
-            readyToClose = CompletableFuture.completedFuture(null);
+            readyToClose = MinimalFuture.completedFuture(null);
         }
         readyToClose.whenComplete((r, error) -> {
             enqueueClose(new Close(code, ""))