src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/ResponseSubscribers.java
equal
deleted
inserted
replaced
205 public void onNext(List<ByteBuffer> items) { |
205 public void onNext(List<ByteBuffer> items) { |
206 // incoming buffers are allocated by http client internally, |
206 // incoming buffers are allocated by http client internally, |
207 // and won't be used anywhere except this place. |
207 // and won't be used anywhere except this place. |
208 // So it's free simply to store them for further processing. |
208 // So it's free simply to store them for further processing. |
209 assert Utils.hasRemaining(items); |
209 assert Utils.hasRemaining(items); |
210 Utils.accumulateBuffers(received, items); |
210 received.addAll(items); |
211 } |
211 } |
212 |
212 |
213 @Override |
213 @Override |
214 public void onError(Throwable throwable) { |
214 public void onError(Throwable throwable) { |
215 received.clear(); |
215 received.clear(); |