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

2019-05-09 Thread Iris Clark
: Thursday, May 9, 2019 1:04 AM To: Coleen Phillimore ; Schmelter, Ralf ; Java Core Libs ; hotspot-runtime-...@openjdk.java.net; Harold David Seigel Subject: RE: RFR(L): 8218628: Add detailed message to NullPointerException describing what is null. Hi, here a webrev which uses 'cannot'. No

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

2019-05-09 Thread Lindenmaier, Goetz
m; Schmelter, Ralf ; > Java Core Libs ; hotspot-runtime- > d...@openjdk.java.net; Harold David Seigel > Subject: RE: RFR(L): 8218628: Add detailed message to NullPointerException > describing what is null. > > Hi, > > > Cannot is apparently preferable in English. >

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

2019-05-09 Thread Lindenmaier, Goetz
-...@openjdk.java.net; Harold David Seigel > > Subject: Re: RFR(L): 8218628: Add detailed message to NullPointerException > describing what is null. > > > > On 5/7/19 9:36 AM, Lindenmaier, Goetz wrote: > > Hi, > > > > Please have a look at this further

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

2019-05-08 Thread coleen . phillimore
a Core Libs ; hotspot-runtime-...@openjdk.java.net; Coleen Phillimore (coleen.phillim...@oracle.com) Subject: RE: RFR(L): 8218628: Add detailed message to NullPointerException describing what is null. Hi Goetz, I've played with the messages a little bit and they generally look good. But I've

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

2019-05-07 Thread Schmelter, Ralf
Hi Goetz, I've played with the messages a little bit and they generally look good. But I've come across two which look strange: - 'o[static Test.INDEX]' is null. Can not invoke method 'int java.lang.Object.hashCode()' - 'o[The return value of 'int java.lang.String.hashCode()]' is null. Can

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

2019-05-07 Thread Lindenmaier, Goetz
Best regards, Goetz. > -Original Message- > From: Schmelter, Ralf > Sent: Dienstag, 7. Mai 2019 14:35 > To: Lindenmaier, Goetz ; Java Core Libs libs-...@openjdk.java.net>; hotspot-runtime-...@openjdk.java.net; Coleen > Phillimore (coleen.phillim...@oracle.com) > Sub

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

2019-05-06 Thread Lindenmaier, Goetz
t: Donnerstag, 14. März 2019 21:56 > > To: 'Mandy Chung' ; 'Roger Riggs' > > > > Cc: 'Java Core Libs' ; 'hotspot-runtime- > > d...@openjdk.java.net' > > Subject: RE: RFR(L): 8218628: Add detailed message to NullPointerException > > describing what is null. &

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

2019-04-12 Thread Jason Mehrens
Sent: Friday, April 12, 2019 5:33 AM To: Mandy Chung; Roger Riggs Cc: Java Core Libs; hotspot-runtime-...@openjdk.java.net Subject: RE: RFR(L): 8218628: Add detailed message to NullPointerException describing what is null. Hi, while waiting for progress on corresponding the JEP, I improved

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

2019-04-12 Thread Lindenmaier, Goetz
-Original Message- > From: Lindenmaier, Goetz > Sent: Donnerstag, 14. März 2019 21:56 > To: 'Mandy Chung' ; 'Roger Riggs' > > Cc: 'Java Core Libs' ; 'hotspot-runtime- > d...@openjdk.java.net' > Subject: RE: RFR(L): 8218628: Add detailed message to NullPointerException

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

2019-04-03 Thread Lindenmaier, Goetz
; hotspot-runtime- > d...@openjdk.java.net > Subject: Re: RFR(L): 8218628: Add detailed message to NullPointerException > describing what is null. > > Hi Goetz, > please find the attached ASM-based patch. It is just a PoC, as such it > does not provide as fine-grained message

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

2019-04-01 Thread Lindenmaier, Goetz
Hi Peter, > -Original Message- > From: Peter Levart > Sent: Freitag, 29. März 2019 16:44 > To: Lindenmaier, Goetz ; 'Mandy Chung' > > Cc: core-libs-dev@openjdk.java.net; maurizio.cimadam...@oracle.com; > hotspot-runtime-...@openjdk.java.net > Subject: Re: RFR(L

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

2019-03-29 Thread Peter Levart
On 3/29/19 4:36 PM, Peter Levart wrote: On 3/29/19 8:49 AM, Lindenmaier, Goetz wrote: So I want to withdraw my claim that NPEs are thrown frequently. Probably I was biased by my compiler construction background, remembering NPE checks are all over the place in the code. But I think I can

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

2019-03-29 Thread Peter Levart
On 3/29/19 8:49 AM, Lindenmaier, Goetz wrote: So I want to withdraw my claim that NPEs are thrown frequently. Probably I was biased by my compiler construction background, remembering NPE checks are all over the place in the code. But I think I can still keep the claim that the message is

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

2019-03-29 Thread Lindenmaier, Goetz
Hi Mandy, I could access the JBS now, so part 2 of my reply. Yesterday, I added tables to the JEP describing what is printed for which bytecode. If this is too verbose for the JEP, it might be nice in the bug implementing it. > > This is a design decision not to make the printout too complex.

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

2019-03-29 Thread Lindenmaier, Goetz
Hi Mandy, The JBS is offline, so I'll just reply on this item for now: > > > Since the JEP quotes that NullPointerExceptions are thrown frequently > > > and swallowed, it would help if you can generate some numbers. > > > This JEP will help the discussion on the proposed feature and design and

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

2019-03-28 Thread Mandy Chung
On 3/27/19 7:18 AM, Lindenmaier, Goetz wrote: , is this example very clear to them that it won't be supported? You probably meant that for n().getNull().m() it is not printed that getNull() was called on the result of n()? Yes, I caught my error after I sent my example. This is a

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

2019-03-27 Thread Lindenmaier, Goetz
Hi Mandy, >and also the cases when it requires to look at its caller > frame. > > Never. Only the method that was executed when the exception is > thrown is needed. I only mention the backtrace because it happens to > store the top method and the corresponding

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

2019-03-26 Thread Mandy Chung
On 3/26/19 4:57 AM, Lindenmaier, Goetz wrote: and also the cases when it requires to look at its caller frame. Never. Only the method that was executed when the exception is thrown is needed. I only mention the backtrace because it happens to store the top method and the corresponding

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

2019-03-26 Thread Lindenmaier, Goetz
Hi Mandy, thanks for reading the JEP and giving detailed feedback! > In the "Basic algorithm to compute the message" section: > > "This dataflow analysis walks the bytecodes forward simulating the execution > stack." > > Please elaborate it. Given a stack trace, it starts with the most

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

2019-03-25 Thread Mandy Chung
Hi Goetz, On 3/15/19 3:55 AM, Lindenmaier, Goetz wrote: I followed your advice and created a JEP: https://bugs.openjdk.java.net/browse/JDK-8220715 This is a good start.   I include my comments as a reader who does not read TrackingStackCreator and other C++ code. In the "Basic algorithm to

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

2019-03-20 Thread Mandy Chung
On 3/20/19 1:54 AM, Lindenmaier, Goetz wrote: Should I move the JEP to status 'submitted'? Per the Process states section  [1] Draft --- In circulation by the author for initial review and consensus-building I certainly don't want to be the bottleneck.   Others can help do the initial

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

2019-03-20 Thread Lindenmaier, Goetz
. > > > >> -Original Message- > >> From: mark.reinh...@oracle.com > >> Sent: Donnerstag, 14. März 2019 22:38 > >> To: maurizio.cimadam...@oracle.com; Lindenmaier, Goetz > >> > >> Cc: mandy.ch...@oracle.com; roger.ri...@oracle.com;

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

2019-03-19 Thread Mandy Chung
. März 2019 22:38 To: maurizio.cimadam...@oracle.com; Lindenmaier, Goetz 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

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

2019-03-18 Thread Lindenmaier, Goetz
>> > >> Other issues have been discussed in the mail thread before. > >> Good that you point this out, I'll add it to the JEP. > >> > >> Best regards, > >>    Goetz > >> > >> ... Sorry, I missed the "reply all" o

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

2019-03-18 Thread Lindenmaier, Goetz
Goetz > > > > ... Sorry, I missed the "reply all" on my first reply. > > > > > > > > > >> -Original Message----- > >> From: Maurizio Cimadamore > >> Sent: Freitag, 15. März 2019 12:33 > >> To: Lindenmai

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

2019-03-15 Thread Mandy Chung
.. Sorry, I missed the "reply all" on my first reply. -Original Message- From: Maurizio Cimadamore Sent: Freitag, 15. März 2019 12:33 To: Lindenmaier, Goetz ; Mandy Chung ; Roger Riggs Cc: Java Core Libs ; hotspot-runtime- d...@openjdk.java.net Subject: Re: RFR(L): 8218

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

2019-03-15 Thread Maurizio Cimadamore
sage- From: Maurizio Cimadamore Sent: Freitag, 15. März 2019 12:33 To: Lindenmaier, Goetz ; Mandy Chung ; Roger Riggs Cc: Java Core Libs ; hotspot-runtime- d...@openjdk.java.net Subject: Re: RFR(L): 8218628: Add detailed message to NullPointerException describing what is null. Hi Goetz, pl

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

2019-03-15 Thread Lindenmaier, Goetz
; ; Roger Riggs > Cc: Java Core Libs ; hotspot-runtime- > d...@openjdk.java.net > Subject: Re: RFR(L): 8218628: Add detailed message to NullPointerException > describing what is null. > > Hi Goetz, > please find the attached ASM-based patch. It is just a PoC, as such it >

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

2019-03-15 Thread Maurizio Cimadamore
Hi Goetz, please find the attached ASM-based patch. It is just a PoC, as such it does not provide as fine-grained messages as the one discussed in the RFE/JEP, but can be enhanced to cover custom debugging attribute, I believe. When running this: Object o = null; o.toString(); you get:

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

2019-03-15 Thread Lindenmaier, Goetz
om; 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 say

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

2019-03-15 Thread Lindenmaier, Goetz
Hi Maurizio, > > 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

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

2019-03-14 Thread mark . reinhold
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

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

2019-03-14 Thread Lindenmaier, Goetz
Hi Coleen, thanks for looking at my change.. > For the record, I think the C++ implementation is more straightforward > than trying to use the Stackwalker and ASM because there's other code > just like it right here. You have all the information you need directly > in the Throwable.backtrace

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

2019-03-14 Thread Maurizio Cimadamore
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. A

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

2019-03-14 Thread Lindenmaier, Goetz
Hi, > 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

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

2019-03-13 Thread Mandy Chung
Hi Goetz, 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. This is not a small enhancement. Diving into a large code review would not be the best way

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

2019-03-13 Thread Jason Mehrens
on behalf of Lindenmaier, Goetz Sent: Tuesday, March 12, 2019 10:04 AM To: Peter Levart; Roger Riggs; Java Core Libs Cc: hotspot-runtime-...@openjdk.java.net Subject: RE: RFR(L): 8218628: Add detailed message to NullPointerException describing what is null. Hi Peter, >56 private sta

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

2019-03-12 Thread Lindenmaier, Goetz
ndows/AltFocusIssueTest.java > > is failing in a headless environment with an NPE on this line: > > SwingUtilities.invokeAndWait(() -> frame.dispose()); > > With this change it said "while trying to invoke the method > javax.swing.JFrame.dispose(()V) of a null object lo

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

2019-02-21 Thread Lindenmaier, Goetz
Hi Andrew, > Ok. However, if you have the appropriate method bytecodes and the BCI at > which the exception occurred then I'm not sure why you would need ASM. I implemented it in C++ at first. I was asked to investigate an implementation in Java by the reviewers. Thanks! Goetz > Also, it

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

2019-02-21 Thread Andrew Dinn
On 21/02/2019 12:57, Lindenmaier, Goetz wrote: > thanks for giving this advice! It confirms the problems I see. You are welcome. > For the context: > The idea was to implement this in Java using StackWalker and > ASM. If I had the right bytecodes, and the right starting point, > ASM would be

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

2019-02-21 Thread Lindenmaier, Goetz
look some more into the reconstituter code... Thanks, Goetz. > -Original Message- > From: Andrew Dinn > Sent: Mittwoch, 20. Februar 2019 18:29 > To: Lindenmaier, Goetz > Cc: core-libs-dev ; hotspot-runtime- > d...@openjdk.java.net > Subject: Re: RFR(L): 8218628:

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

2019-02-20 Thread Andrew Dinn
Hi Goetz, Forgive me for jumping in here and, possibly, misunderstanding what you want -- I may have misunderstood what you are trying to do as I have not been following this thread carefully. On 20/02/2019 16:36, Lindenmaier, Goetz wrote: > 1. As I understand, it would be simple to extend ASM

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

2019-02-20 Thread Lindenmaier, Goetz
Hi Remi, > yes, it's a feature of ASM, offer the right abstraction to do bytecode > generation/transformation i.e. a stream of opcodes that are more abstract > than the real bytecode, so there is no way to get a direct access to the > bytecode at a specific BCI. For the generation of the NPE

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

2019-02-20 Thread Remi Forax
e----- >> From: Peter Levart >> Sent: Freitag, 15. Februar 2019 18:38 >> To: Lindenmaier, Goetz ; Roger Riggs >> ; Java Core Libs >> Cc: hotspot-runtime-...@openjdk.java.net >> Subject: Re: RFR(L): 8218628: Add detailed message to NullPointerException >>

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

2019-02-19 Thread Mandy Chung
Levart Sent: Freitag, 15. Februar 2019 18:38 To: Lindenmaier, Goetz ; Roger Riggs ; Java Core Libs Cc: hotspot-runtime-...@openjdk.java.net Subject: Re: RFR(L): 8218628: Add detailed message to NullPointerException describing what is null. Hi Goetz, Just a couple of things if you go that route

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

2019-02-19 Thread Lindenmaier, Goetz
often is a big overhead. E.g., I look at about 50 failing jtreg > > tests every day, I don't want to get each into the debugger every time > > in the setup where it was running to see what is wrong ... > > > > E.g., com/sun/java/swing/plaf/windows/AltFocusIssueTest.java > > is fai

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

2019-02-15 Thread Peter Levart
2. Februar 2019 17:03 To: Lindenmaier, Goetz ; Java Core Libs Cc: hotspot-runtime-...@openjdk.java.net Subject: Re: RFR(L): 8218628: Add detailed message to NullPointerException describing what is null. Hi, On 02/12/2019 08:14 AM, Lindenmaier, Goetz wrote: Hi Roger, thanks for lookin

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

2019-02-14 Thread Lindenmaier, Goetz
m static field AltFocusIssueTest.frame" and I figured it's the fact we run headless that makes the test fail without even looking at the code. Best regards, Goetz From: Roger Riggs Sent: Dienstag, 12. Februar 2019 17:03 To: Lindenmaier, Goetz ; Java Core Libs Cc: hotspot-runtime-...@o

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

2019-02-13 Thread Mandy Chung
Riggs Cc: Java Core Libs ; hotspot-runtime- d...@openjdk.java.net Subject: Re: RFR(L): 8218628: Add detailed message to NullPointerException describing what is null. On 2/8/19 11:46 AM, Roger Riggs wrote: Hi, A few higher level issues should be considered, though the details of the webrev

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

2019-02-13 Thread Lindenmaier, Goetz
__ > Von: core-libs-dev im Auftrag > von Roger Riggs > Gesendet: Dienstag, Februar 12, 2019 8:07 PM > An: Lindenmaier, Goetz; Java Core Libs > Cc: hotspot-runtime-...@openjdk.java.net > Betreff: Re: RFR(L): 8218628: Add detailed message to NullPointerException > describing what i

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

2019-02-13 Thread Lindenmaier, Goetz
webrev for that. Best regards, Goetz. > -Original Message- > From: core-libs-dev On Behalf > Of Mandy Chung > Sent: Tuesday, February 12, 2019 7:32 PM > To: Roger Riggs > Cc: Java Core Libs ; hotspot-runtime- > d...@openjdk.java.net > Subject: Re: RFR(L): 82186

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

2019-02-12 Thread Bernd Eckenfels
Libs Cc: hotspot-runtime-...@openjdk.java.net Betreff: Re: RFR(L): 8218628: Add detailed message to NullPointerException describing what is null. Hi, On 02/12/2019 08:14 AM, Lindenmaier, Goetz wrote: > Hi Roger, > > thanks for looking at my change! > >> A few higher l

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

2019-02-12 Thread Mandy Chung
On 2/8/19 11:46 AM, Roger Riggs wrote: Hi, A few higher level issues should be considered, though the details of the webrev captured my immediate attention. Is this the right feature and is this the right level of implementation (C++/native)? : How much of this can be done in Java code with

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

2019-02-12 Thread Roger Riggs
Hi, On 02/12/2019 08:14 AM, Lindenmaier, Goetz wrote: Hi Roger, thanks for looking at my change! A few higher level issues should be considered, though the details of the webrev captured my immediate attention. Is this the right feature Yes!! Maybe, that's what debuggers are for. and

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

2019-02-12 Thread Lindenmaier, Goetz
avaClasses.cpp. Best regards, Goetz. > -Original Message- > From: Daniel Fuchs > Sent: Dienstag, 12. Februar 2019 14:55 > To: Lindenmaier, Goetz ; Roger Riggs > ; Java Core Libs > Cc: hotspot-runtime-...@openjdk.java.net > Subject: Re: RFR(L): 8218628: Add detailed me

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

2019-02-12 Thread Daniel Fuchs
Hi Goetz, On 12/02/2019 14:14, Lindenmaier, Goetz wrote: StackWalker operates on the Java stack tracke, which does not contain the BCI to my knowledge. For what it's worth, StackWalker::StackFrame has the BCI: returned by public int getByteCodeIndex(); [1] But I am not sure how you

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

2019-02-12 Thread Lindenmaier, Goetz
Hi Roger, thanks for looking at my change! > A few higher level issues should be considered, though the details of > the webrev captured my immediate attention. > > Is this the right feature Yes!! > and is this the right level of implementation (C++/native)? See below. > From a security

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

2019-02-08 Thread Roger Riggs
Hi, A few higher level issues should be considered, though the details of the webrev captured my immediate attention. Is this the right feature and is this the right level of implementation (C++/native)? From a security perspective, adding field names to exceptions exposes information to

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

2019-02-08 Thread Roger Riggs
Hi Goetz, On 02/08/2019 06:51 AM, Lindenmaier, Goetz wrote: ... though I think trying to produce signatures within the message is going to be very awkward in the general case. The key part is the "method NPE.b() ... returned from NPE.a()" Actually, I have left out code that changes the

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

2019-02-08 Thread Peter Levart
gt; >> >> >> >> >>> -----Original Message----- >>> From: David Holmes >>> Sent: Freitag, 8. Februar 2019 13:31 >>> To: Lindenmaier, Goetz ; hotspot-runtime- >>> d...@openjdk.java.net; Java Core Libs >>> Subject: Re: RFR(L):

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

2019-02-08 Thread Peter Levart
Goetz ; hotspot-runtime- >> d...@openjdk.java.net; Java Core Libs >> Subject: Re: RFR(L): 8218628: Add detailed message to >> NullPointerException >> describing what is null. >> >> Hi Goetz, >> >> Just one follow up for now: >> >

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

2019-02-08 Thread Langer, Christoph
Hi Goetz, > 91 synchronized (this) { > -> I think this is not needed here. The transient modifier for > lazyComputeMessage already implies the lock on the Object, I think. please ignore this comment, I'm wrong here. I confused transient with volatile... /Christoph

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

2019-02-08 Thread Langer, Christoph
Hi Goetz, > ok, so here a new webrev just adding a setter for the field: > http://cr.openjdk.java.net/~goetz/wr19/8218628-exMsg-NPE/02 > > ... and incorporating the other comments. Looks better  I have a few additions to src/java.base/share/classes/java/lang/NullPointerException.java: 28

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

2019-02-08 Thread Lindenmaier, Goetz
019 13:31 > To: Lindenmaier, Goetz ; hotspot-runtime- > d...@openjdk.java.net; Java Core Libs > Subject: Re: RFR(L): 8218628: Add detailed message to NullPointerException > describing what is null. > > Hi Goetz, > > Just one follow up for now: > > > * Add pa

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

2019-02-08 Thread David Holmes
Hi Goetz, Just one follow up for now: * Add package visible "void setMessage (String msg)" to Throwable. Yes, just use package accessibility to deal with this, no need to jump through hoops (or the VM :) ). Thanks, David On 8/02/2019 9:51 pm, Lindenmaier, Goetz wrote: Hi David, Hi

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

2019-02-08 Thread Lindenmaier, Goetz
Hi David, > Hi Volker, ... I assume Volker could have contributed this as well, but actually I must mention Ralf Schmelter as the original author of this :) > You know I'm not going to be a big fan of this :), but as long as we > don't pay for it if we don't want it, then that's okay. (I'm

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

2019-02-08 Thread Lindenmaier, Goetz
Original Message- > > From: hotspot-runtime-dev > boun...@openjdk.java.net> On Behalf Of Lindenmaier, Goetz > > Sent: Donnerstag, 7. Februar 2019 17:43 > > To: hotspot-runtime-...@openjdk.java.net; Java Core Libs > d...@openjdk.java.net> > > Subject: [CAUT

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

2019-02-08 Thread Langer, Christoph
> 122 private native void setDefaultMessage(String extendedMessage); > Here, I agree with David, that you should do it in Java. Just use a shared > secret, then you don't even need reflection... Addition: you should not even need to use a shared secret as Throwable and NPE are in the same

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

2019-02-08 Thread Langer, Christoph
tspot-runtime-...@openjdk.java.net; Java Core Libs d...@openjdk.java.net> > Subject: [CAUTION] RFR(L): 8218628: Add detailed message to > NullPointerException describing what is null. > > Hi, > > since Java 5, our internal VM reports verbose null pointer except

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

2019-02-07 Thread David Holmes
In 8/02/2019 10:05 am, David Holmes wrote: Hi Volker, Aaarggh!! Sorry Volker and Goetz. No idea where that came from. David - You know I'm not going to be a big fan of this :), but as long as we don't pay for it if we don't want it, then that's okay. (I'm still trying to gauge that)

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

2019-02-07 Thread David Holmes
Hi Volker, You know I'm not going to be a big fan of this :), but as long as we don't pay for it if we don't want it, then that's okay. (I'm still trying to gauge that) I have a little test for this that I ran through your patch: public class NPE { static class B { C b() { return

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

2019-02-07 Thread Lindenmaier, Goetz
Hi, since Java 5, our internal VM reports verbose null pointer exception messages. I would like to contribute this feature to OpenJDK. With this change, messages as "java.lang.NullPointerException: while trying to load from a null int array loaded from local variable 'ia1'" are printed. For