RFR: JDK-8219483: j.l.c.ClassDesc::nested(String, String...) doesn't throw NPE if any arg is null
Joe Darcy
joe.darcy at oracle.com
Sat Apr 27 01:32:25 UTC 2019
Hi Vicente,
For purposes of a better exception message, do you want to explicitly
check moreNestedNames for null in some way before accessing its
contents? Also, I'd commend the spec be updated slightly to
@throws NullPointerException if any argument or its contents is
{@code null}
assuming the desired behavior is a NPE if an element of moreNestedNames
is null as opposed to ust moreNestedNames itself.
Thanks,
-Joe
On 4/26/2019 9:33 AM, Vicente Romero wrote:
> Hi,
>
> Please review fix [1] and CSR [2] for [3]. The API for method
> j.l.c.ClassDesc::nested(String, String...) states that it should throw
> NPE if any of the arguments is null. The implementation is not in sync
> with the API and should be corrected,
>
> Thanks,
> Vicente
>
> [1] http://cr.openjdk.java.net/~vromero/8219483/webrev.00/
> [2] https://bugs.openjdk.java.net/browse/JDK-8223034
> [3] https://bugs.openjdk.java.net/browse/JDK-8219483
>
More information about the core-libs-dev
mailing list