Hi Thomas, thanks for pointing this out. I improved the placement of the ResourceMarks. Unfortunately, base() returns an immutable string, but for trim_well_known_class_names this does not work. So I'd propose this: http://cr.openjdk.java.net/~goetz/wr19/8218628-exMsg-NPE/17-incremental/ http://cr.openjdk.java.net/~goetz/wr19/8218628-exMsg-NPE/17/
Best regards, Goetz. > -----Original Message----- > From: Thomas Stüfe <thomas.stu...@gmail.com> > Sent: Dienstag, 17. September 2019 09:06 > To: Lindenmaier, Goetz <goetz.lindenma...@sap.com> > Cc: Hotspot dev runtime <hotspot-runtime-...@openjdk.java.net>; Java Core > Libs <core-libs-dev@openjdk.java.net> > Subject: Re: RFR (L, final): 8218626: Add detailed message to > NullPointerException describing what is null. > > Additionally, since 8224193, stringStream does not use RA anymore, so you do > not need ResourceMarks for the backing buffer. 8224193 has been backported > to 11, btw. > > On Mon, Sep 16, 2019 at 2:53 PM Thomas Stüfe <thomas.stu...@gmail.com > <mailto:thomas.stu...@gmail.com> > wrote: > > > Hi Goetz, > > not a full review, just a small suggestion. In jvm.cpp you could just > access ss->base() instead of ss->as_string() since the internal buffer is > already > NULL terminated and result_string does not outlive the stringStream object. > Also it misses including ostream.hpp. > > Cheers, Thomas > > > On Tue, Sep 10, 2019 at 4:46 PM Lindenmaier, Goetz > <goetz.lindenma...@sap.com <mailto:goetz.lindenma...@sap.com> > wrote: > > > Hi, > > the subject should mention 8218628. (Not 8218626). > Sorry for this! > > Best regards, > Goetz. > > From: Lindenmaier, Goetz > Sent: Dienstag, 10. September 2019 11:48 > To: 'Hotspot dev runtime' <hotspot-runtime- > d...@openjdk.java.net <mailto:hotspot-runtime-...@openjdk.java.net> >; Java > Core Libs <core-libs-dev@openjdk.java.net <mailto:core-libs- > d...@openjdk.java.net> > > Subject: RFR (L, final): 8218626: Add detailed message to > NullPointerException describing what is null. > > Hi, > > this is the implementation of JEP 358: Helpful > NullPointerExceptions. > > The JEP is in status "Candidate". Coleen (many, many thanks!) > ran > it through the Oracle-internal processes. Now I please need > final reviews > for this change so that I can propose it to target jdk 14. > > JEP: https://bugs.openjdk.java.net/browse/JDK-8220715 > Enhancement: https://bugs.openjdk.java.net/browse/JDK- > 8218628 > webrev: http://cr.openjdk.java.net/~goetz/wr19/8218628- > exMsg-NPE/16/ > > The change ran through a lot of testing, all jtreg and jck > tests to > name > only some. The webrev points to patch > http://cr.openjdk.java.net/~goetz/wr19/8218628-exMsg- > NPE/16/enable_NPE_message.patch > that enables the change by default, which was useful for > testing to > assure the code is used in the tests. > I just pushed the change to jdk/submit once more. > > Please review. > > Thanks! > Goetz. >