8067801: Enforce null check for underlying I/O streams

Brian Burkhalter brian.burkhalter at oracle.com
Thu Jul 18 15:55:46 UTC 2019

> On Jul 18, 2019, at 8:52 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
> On 17/07/2019 17:12, Brian Burkhalter wrote:
>> https://bugs.openjdk.java.net/browse/JDK-8067801 <https://bugs.openjdk.java.net/browse/JDK-8067801>
>> http://cr.openjdk.java.net/~bpb/8067801/webrev.00/ <http://cr.openjdk.java.net/~bpb/8067801/webrev.00/>
>> Add null check to Filter{In,Out}putStream constructors. This covers all the cases listed in the issue as those are all subclasses of these two classes. No javadoc update is need due to this statement in the java.io <http://java.io/> package doc:
>> "Unless otherwise noted, passing a null argument to a constructor or method in any class or interface in this package will cause a NullPointerException to be thrown."
> I see this is has pushed but I think it will need to be re-examined because the javadoc allows `in` and `out` to be specified as null and set after the stream is created (the javadoc for the parameters overrides the "Unless otherwise ..." text in the package description)

Argh. I guess you are correct.


More information about the core-libs-dev mailing list