RFR(L): 8218628: Add detailed message to NullPointerException describing what is null.

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Thu Mar 14 14:58:35 UTC 2019


> Roger, Coleen, Maurizio and I talked about this proposed feature.
> We all think that improving NPE message is a useful enhancement for
> the platform and helps developers to tell what causes NPE.
Thanks for this positive feedback :)!

> This is not a small enhancement.  Diving into a large code review
> would not be the best way to move this forward as you can see the
> discussion so far.
> It would help if you can start with writing down the problem and
> the proposal like what improvements are proposed and under what
> circumstances may be acceptable that NPE message won't be improved.
> This would get the discussion on the proposal feature and then
> the discussion of the best way to to implement it in the VM, library,
> or combination.  You can consider using the JEP template that gives
> you a good structure to follow for the write up.

Yes, I can write down the overall design of this.  This probably is a good
I already started editing, but please give me a day or two.

The past days I have been working on the C-code. I incorporated 
Coleens comments, but mostly changed the messages to print 
different text as it was proposed in several reviews. 
I'm about to publish a webrev with this new coding. This could 
be a new, better basis for discussing the wording of the message.

Best regards,


> What do you think?
> Mandy

More information about the core-libs-dev mailing list