[15] RFR: 8248476: No helpful NullPointerException message after calling fillInStackTrace

forax at univ-mlv.fr forax at univ-mlv.fr
Thu Jul 2 17:28:34 UTC 2020


Hi Goetz,
I believe numStackTracesFilledIn has to be declared volatile too,
because otherwise if one thread call explicitly fillInStackTrace() and another call getMessage(), the second thread can see the value numStackTracesFilledIn not updated.

Rémi

----- Mail original -----
> De: "Goetz Lindenmaier" <goetz.lindenmaier at sap.com>
> À: "Christoph Dreis" <christoph.dreis at freenet.de>
> Cc: "hotspot-runtime-dev" <hotspot-runtime-dev at openjdk.java.net>, "David Holmes" <david.holmes at oracle.com>, "Alan
> Bateman" <Alan.Bateman at oracle.com>, "Remi Forax" <forax at univ-mlv.fr>
> Envoyé: Jeudi 2 Juillet 2020 18:45:36
> Objet: RE: [15] RFR: 8248476: No helpful NullPointerException message after calling fillInStackTrace

> Hi Christoph,
> 
> I fixed the comment, thanks for pointing that out.
> 
> Best regards,
>  Geotz
> 
>> -----Original Message-----
>> From: Christoph Dreis <christoph.dreis at freenet.de>
>> Sent: Thursday, July 2, 2020 5:18 PM
>> To: Lindenmaier, Goetz <goetz.lindenmaier at sap.com>
>> Cc: hotspot-runtime-dev <hotspot-runtime-dev at openjdk.java.net>; 'David
>> Holmes' <david.holmes at oracle.com>; Alan Bateman
>> <Alan.Bateman at oracle.com>; Remi Forax <forax at univ-mlv.fr>
>> Subject: Re: [15] RFR: 8248476: No helpful NullPointerException message
>> after calling fillInStackTrace
>> 
>> Hi Goetz,
>> 
>> > Thanks for the plentiful feedback!
>> 
>> > I tried to incorporate all in this webrev.
>> > http://cr.openjdk.java.net/~goetz/wr20/8248476-NPE_fillInStackTrace-
>> jdk15/04/
>> 
>> Thanks for pushing this forward.
>> 
>> I noticed a minor typo:
>> In line 1286 of the new test in NullPointerExceptionTest the comment says
>> "crated" while it probably should read "created".
>> 
>> Cheers,
>> Christoph
>> 
>> 
>> > -----Original Message-----
>> > From: David Holmes <david.holmes at oracle.com>
>> > Sent: Thursday, July 2, 2020 9:47 AM
>> > To: Alan Bateman <Alan.Bateman at oracle.com>; Lindenmaier, Goetz
>> > <goetz.lindenmaier at sap.com>; Remi Forax <forax at univ-mlv.fr>
>> > Cc: Christoph Dreis <christoph.dreis at freenet.de>; hotspot-runtime-dev
>> > <hotspot-runtime-dev at openjdk.java.net>
>> > Subject: Re: [15] RFR: 8248476: No helpful NullPointerException message
>> > after calling fillInStackTrace
>> >
>> > On 2/07/2020 4:10 pm, Alan Bateman wrote:
>> > > On 02/07/2020 00:58, David Holmes wrote:
>> > >>
>> > >> I don't think one int field is a problem in terms of memory consumption.
>> > > No, but it may change the serial form. If there is counter for the
>> > > number of times that fillInStackTrace then it should be transient (and
>> > > no need to explicitly initialize it to its default value).
>> >
>> > Yes good point! Thanks Alan!
>> >
>> > David
>> >
>> > > -Alan


More information about the hotspot-runtime-dev mailing list