src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/BufferingSubscriber.java
changeset 48379 5382baab8371
parent 48083 b1c1b4ef4be2
child 56008 bbd688c6fbbb
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/BufferingSubscriber.java	Tue Dec 19 08:51:11 2017 -0800
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/BufferingSubscriber.java	Mon Dec 18 10:21:38 2017 +0000
@@ -80,7 +80,7 @@
 
     BufferingSubscriber(HttpResponse.BodySubscriber<T> downstreamSubscriber,
                         int bufferSize) {
-        this.downstreamSubscriber = downstreamSubscriber;
+        this.downstreamSubscriber = Objects.requireNonNull(downstreamSubscriber);
         this.bufferSize = bufferSize;
         synchronized (buffersLock) {
             internalBuffers = new ArrayList<>();