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

Lindenmaier, Goetz goetz.lindenmaier at sap.com
Thu Jul 2 14:11:47 UTC 2020

Hi everybody, 

Thanks for the plentiful feedback!

I tried to incorporate all in this webrev.

Alan, thanks for pointing out the transient issue. After serialization, no
message will be generated anyways, so checking the field is pointless, 
and the field can have any value.
Mandy, thanks for pointing me to @inheritDoc.

About checking
  if (result == this) numStackTracesFilledIn++;
I could also do result.numStackTracesFilledIn++;
But yes, looking at the implementation of 
fillInStackTrace it returns this.  But I like the 
code be locally correct. If the called function is 
changed, the local code will break. After all, 
fillInStackTrace returns the object.

But as several of you agreed, let's keep it as 
Is now. 

Best regards,

> -----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