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

Dan Xu dan.xu at oracle.com
Sat Sep 28 00:04:03 UTC 2013

It looks good.


On 09/27/2013 03:53 PM, Mike Duigou 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