-
CSR
-
Resolution: Approved
-
P3
-
None
-
behavioral
-
minimal
-
The java.lang.constant API is very recent, introduced in JDK12, so we don't expect that there is a lot of user code depending on it
-
Java API
-
SE
Summary
The API for method: j.l.c.ClassDesc::nested(String, String...) states that it will throw an exception if any argument is null and the implementation must enforce this assertion
Problem
The API for method: j.l.c.ClassDesc::nested(String, String...) states that it will throw an exception if any argument is null. The implementation is not enforcing this assertion
Solution
Throw a NullPointerException if any argument passed to the method is null.
Specification
/**
* Returns a {@linkplain ClassDesc} for a nested class of the class or
* interface type described by this {@linkplain ClassDesc}.
*
* @param firstNestedName the unqualified name of the first level of nested class
* @param moreNestedNames the unqualified name(s) of the remaining levels of
* nested class
* @return a {@linkplain ClassDesc} describing the nested class
- * @throws NullPointerException if any argument is {@code null}
+ * @throws NullPointerException if any argument or its contents is {@code null}
* @throws IllegalStateException if this {@linkplain ClassDesc} does not
* describe a class or interface type
* @throws IllegalArgumentException if the nested class name is invalid
*/
- csr of
-
JDK-8219483 j.l.c.ClassDesc::nested(String, String...) doesn't throw NPE if any arg is null
-
- Resolved
-