< prev index next >
src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/BufferingSubscriber.java
Print this page
*** 78,88 ****
private volatile int state;
BufferingSubscriber(HttpResponse.BodySubscriber<T> downstreamSubscriber,
int bufferSize) {
! this.downstreamSubscriber = downstreamSubscriber;
this.bufferSize = bufferSize;
synchronized (buffersLock) {
internalBuffers = new ArrayList<>();
}
state = UNSUBSCRIBED;
--- 78,88 ----
private volatile int state;
BufferingSubscriber(HttpResponse.BodySubscriber<T> downstreamSubscriber,
int bufferSize) {
! this.downstreamSubscriber = Objects.requireNonNull(downstreamSubscriber);
this.bufferSize = bufferSize;
synchronized (buffersLock) {
internalBuffers = new ArrayList<>();
}
state = UNSUBSCRIBED;
< prev index next >