src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/BufferingSubscriber.java
equal
deleted
inserted
replaced
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; |