-
CSR
-
Resolution: Approved
-
P3
-
behavioral
-
minimal
-
Spec clarification only.
-
Java API
-
SE
Summary
java.nio.file package description could be clearer on the cases where NPE is thrown
Problem
The package description for java.nio.file has a paragraph to specify that NullPointerException is thrown when constructors or methods are invoked with null. This paragraph doesn't clearly cover the case where methods take an array (varargs in this API) and the array contains a null element.
Solution
Update the package description to make it clear that NPE is also thrown when methods are invoked with an array containing a null element.
Specification
Change this statement in the package description from:
Additionally, invoking a method with a collection containing a {@code null} element will cause a {@code NullPointerException}, unless otherwise specified.
to:
Additionally, invoking a method with an array or collection containing a {@code null} element will cause a {@code NullPointerException}, unless otherwise specified.
- csr for
-
JDK-8062632 (fs spec) Package description could be clearer on the cases where NPE is thrown
-
- Closed
-