RFR: JDK-8025610 : (xs) Optional constructor and Optional.of should explicitly document NPE

Chris Hegarty chris.hegarty at oracle.com
Fri Sep 27 23:25:34 UTC 2013


Looks good to me Mike.

-Chris

> On 27 Sep 2013, at 17:53, Mike Duigou <mike.duigou at oracle.com> wrote:
> 
> Hello all;
> 
> As pointed out by Roger Riggs, Optional.of (and the private Optional(T) constructor) don't explicitly document throwing NPE in response to a null value despite describing value as "non-null". This changeset improves the documentation to add an @throws NPE tag to the javadoc.
> 
> http://cr.openjdk.java.net/~mduigou/JDK-8025610/0/webrev/
> 
> Thanks,
> 
> Mike



More information about the core-libs-dev mailing list