RFR(L): 8218628: Add detailed message to NullPointerException describing what is null.
Langer, Christoph
christoph.langer at sap.com
Fri Feb 8 14:13:16 UTC 2019
Hi Goetz,
> ok, so here a new webrev just adding a setter for the field:
> http://cr.openjdk.java.net/~goetz/wr19/8218628-exMsg-NPE/02
>
> ... and incorporating the other comments.
Looks better
I have a few additions to src/java.base/share/classes/java/lang/NullPointerException.java:
28 import java.lang.reflect.Field;
29
-> can be removed now.
91 synchronized (this) {
-> I think this is not needed here. The transient modifier for lazyComputeMessage already implies the lock on the Object, I think.
108 return extendedMessage;
-> I guess it would be more correct if you returned super.getMessage() here.
Thanks
Christoph
More information about the hotspot-runtime-dev
mailing list