src/java.net.http/share/classes/jdk/internal/net/http/ResponseContent.java
branchhttp-client-branch
changeset 56326 63422db47911
parent 56255 39e28481492d
child 56423 ba64c30666cc
equal deleted inserted replaced
56325:195d2970d981 56326:63422db47911
   445                     ByteBuffer buffer = Utils.sliceWithLimitedCapacity(b, amount);
   445                     ByteBuffer buffer = Utils.sliceWithLimitedCapacity(b, amount);
   446                     pusher.onNext(List.of(buffer.asReadOnlyBuffer()));
   446                     pusher.onNext(List.of(buffer.asReadOnlyBuffer()));
   447                 }
   447                 }
   448                 if (unfulfilled == 0) {
   448                 if (unfulfilled == 0) {
   449                     // We're done! All data has been received.
   449                     // We're done! All data has been received.
       
   450                     debug.log(Level.DEBUG, "Parser got all expected bytes: completing");
   450                     assert closedExceptionally == null;
   451                     assert closedExceptionally == null;
   451                     onFinished.run();
   452                     onFinished.run();
   452                     pusher.onComplete();
   453                     pusher.onComplete();
   453                     completed = true;
   454                     completed = true;
   454                     onComplete.accept(closedExceptionally); // should be null
   455                     onComplete.accept(closedExceptionally); // should be null