src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseSubscribers.java
changeset 48379 5382baab8371
parent 48083 b1c1b4ef4be2
child 48408 4f830b447edf
equal deleted inserted replaced
48378:e8e8db4f8194 48379:5382baab8371
    60         private Flow.Subscription subscription;
    60         private Flow.Subscription subscription;
    61         private final CompletableFuture<Void> result = new MinimalFuture<>();
    61         private final CompletableFuture<Void> result = new MinimalFuture<>();
    62         private final AtomicBoolean subscribed = new AtomicBoolean();
    62         private final AtomicBoolean subscribed = new AtomicBoolean();
    63 
    63 
    64         ConsumerSubscriber(Consumer<Optional<byte[]>> consumer) {
    64         ConsumerSubscriber(Consumer<Optional<byte[]>> consumer) {
    65             this.consumer = consumer;
    65             this.consumer = Objects.requireNonNull(consumer);
    66         }
    66         }
    67 
    67 
    68         @Override
    68         @Override
    69         public CompletionStage<Void> getBody() {
    69         public CompletionStage<Void> getBody() {
    70             return result;
    70             return result;