Hi, This JEP proposes to enhance the messages of NullPointerExceptions that are thrown if execution of a bytecode fails due to a null reference. https://bugs.openjdk.java.net/browse/JDK-8220715 A corresponding prototype exists and is submitted to the sandbox repo and is available as change 8218628.
I already got valuable input on this topic by Mandy: http://mail.openjdk.java.net/pipermail/hotspot-runtime-dev/2019-March/033115.html Is anyone else interested in commenting on this? Would someone sponsor this JEP? Best regards, Goetz. > -----Original Message----- > From: Lindenmaier, Goetz > Sent: Freitag, 15. März 2019 11:55 > To: 'mark.reinh...@oracle.com' <mark.reinh...@oracle.com>; > maurizio.cimadam...@oracle.com > Cc: mandy.ch...@oracle.com; roger.ri...@oracle.com; core-libs- > d...@openjdk.java.net; hotspot-runtime-...@openjdk.java.net > Subject: RE: RFR(L): 8218628: Add detailed message to NullPointerException > describing what is null. > > Hi everybody, Mark, > > I followed your advice and created a JEP: > https://bugs.openjdk.java.net/browse/JDK-8220715 > > Please point me to things I need to improve formally, this is my first > JEP. Also feel free to fix the administrative information in the > Jira issue if it is wrong. > > And, naturally, you're welcome to discuss the topic! > > Best regards, > Goetz. > > > -----Original Message----- > > From: mark.reinh...@oracle.com <mark.reinh...@oracle.com> > > Sent: Donnerstag, 14. März 2019 22:38 > > To: maurizio.cimadam...@oracle.com; Lindenmaier, Goetz > > <goetz.lindenma...@sap.com> > > Cc: mandy.ch...@oracle.com; roger.ri...@oracle.com; core-libs- > > d...@openjdk.java.net; hotspot-runtime-...@openjdk.java.net > > Subject: Re: RFR(L): 8218628: Add detailed message to NullPointerException > > describing what is null. > > > > 2019/3/14 8:00:20 -0700, maurizio.cimadam...@oracle.com: > > > I second what Mandy says. > > > > > > First let me start by saying that this enhancement will be a great > > > addition to our platform; back in the days when I was teaching some Java > > > classes at the university, I was very aware of how hard it is to > > > diagnose a NPE for someone novel to Java programming. > > > > Agreed! > > > > > ... > > > > > > I also think that the design space for such an enhancement is non > > > trivial, and would best be explored (and captured!) in a medium that is > > > something other than a patch. ... > > > > Agreed, also. > > > > Goetz -- if, per Mandy’s suggestion, you’re going to write something > > up using the JEP template, might I suggest that you then submit it as > > an actual JEP? Giving visibility to, and recording, such design-space > > explorations is one of the primary goals of the JEP process. > > > > - Mark