src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/BufferingSubscriber.java
changeset 48379 5382baab8371
parent 48083 b1c1b4ef4be2
child 56008 bbd688c6fbbb
equal deleted inserted replaced
48378:e8e8db4f8194 48379:5382baab8371
    78 
    78 
    79     private volatile int state;
    79     private volatile int state;
    80 
    80 
    81     BufferingSubscriber(HttpResponse.BodySubscriber<T> downstreamSubscriber,
    81     BufferingSubscriber(HttpResponse.BodySubscriber<T> downstreamSubscriber,
    82                         int bufferSize) {
    82                         int bufferSize) {
    83         this.downstreamSubscriber = downstreamSubscriber;
    83         this.downstreamSubscriber = Objects.requireNonNull(downstreamSubscriber);
    84         this.bufferSize = bufferSize;
    84         this.bufferSize = bufferSize;
    85         synchronized (buffersLock) {
    85         synchronized (buffersLock) {
    86             internalBuffers = new ArrayList<>();
    86             internalBuffers = new ArrayList<>();
    87         }
    87         }
    88         state = UNSUBSCRIBED;
    88         state = UNSUBSCRIBED;