src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/BufferingSubscriber.java
branchhttp-client-branch
changeset 56008 bbd688c6fbbb
parent 55973 4d9b002587db
parent 48379 5382baab8371
child 56071 3353cb42b1b4
equal deleted inserted replaced
55993:087a6b6d4955 56008:bbd688c6fbbb
    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;