Hi, Goetz. The error messages using "cannot", the preferred word according to the Chicago Manual of Style [0], look good to me.
Thanks, Iris [0] https://www.chicagomanualofstyle.org/qanda/data/faq/topics/Usage/faq0010.html -----Original Message----- From: Lindenmaier, Goetz <goetz.lindenma...@sap.com> Sent: Thursday, May 9, 2019 1:04 AM To: Coleen Phillimore <coleen.phillim...@oracle.com>; Schmelter, Ralf <ralf.schmel...@sap.com>; Java Core Libs <core-libs-dev@openjdk.java.net>; hotspot-runtime-...@openjdk.java.net; Harold David Seigel <harold.sei...@oracle.com> Subject: RE: RFR(L): 8218628: Add detailed message to NullPointerException describing what is null. Hi, here a webrev which uses 'cannot'. Nothing else changed. http://cr.openjdk.java.net/~goetz/wr19/8218628-exMsg-NPE/10-cannot/ Best regards, Goetz. > -----Original Message----- > From: Lindenmaier, Goetz > Sent: Donnerstag, 9. Mai 2019 08:55 > To: coleen.phillim...@oracle.com; Schmelter, Ralf > <ralf.schmel...@sap.com>; Java Core Libs > <core-libs-dev@openjdk.java.net>; hotspot-runtime- > d...@openjdk.java.net; Harold David Seigel <harold.sei...@oracle.com> > Subject: RE: RFR(L): 8218628: Add detailed message to > NullPointerException describing what is null. > > Hi, > > > Cannot is apparently preferable in English. > OK, changed. > > Best regards, > Goetz. > > > > -----Original Message----- > > From: coleen.phillim...@oracle.com <coleen.phillim...@oracle.com> > > Sent: Mittwoch, 8. Mai 2019 17:32 > > To: Lindenmaier, Goetz <goetz.lindenma...@sap.com>; Schmelter, Ralf > > <ralf.schmel...@sap.com>; Java Core Libs > > <core-libs-dev@openjdk.java.net>; > > hotspot-runtime-...@openjdk.java.net; Harold David Seigel > > <harold.sei...@oracle.com> > > 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 improved webrev: > > > http://cr.openjdk.java.net/~goetz/wr19/8218628-exMsg-NPE/09/ > > > http://cr.openjdk.java.net/~goetz/wr19/8218628-exMsg-NPE/09- > > incremental/ > > > > > > Harold, Coleen, thanks for pointing me to those methods. > > > I'm using them now. This simplifies the helper methods > > > considerably. > > > > > > Ralf, thanks for looking at the messages! > > > I now suppress the "static " and > > > "The return value of '" strings in the array subscript expressions > > > and added corresponding test cases. > > > > > > About "can not" versus "cannot", what I find in the net "cannot" > > > is to be preferred. Any comments on that? > > > By native speakers? > > > See example messages here: > > > http://cr.openjdk.java.net/~goetz/wr19/8218628-exMsg- > > NPE/09/output_with_debug_info.txt > > > > Cannot is apparently preferable in English. Native speaker (only > > language) but somebody had to tell me. > > > > Coleen > > > > > > Further, I fixed a build issue with the solaris compiler. > > > All handling of bci is now unsigned. > > > > > > Best regards, > > > Goetz. > > > > > > > > > > > > > > >> -----Original Message----- > > >> From: Schmelter, Ralf > > >> Sent: Dienstag, 7. Mai 2019 14:35 > > >> To: Lindenmaier, Goetz <goetz.lindenma...@sap.com>; Java Core > > >> Libs > > <core- > > >> libs-...@openjdk.java.net>; hotspot-runtime-...@openjdk.java.net; > > Coleen > > >> Phillimore (coleen.phillim...@oracle.com) > <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 > > >> 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 not > > invoke > > >> method 'int java.lang.Object.hashCode()'. > > >> > > >> Here is the test program to reproduce these: > > >> public class Test { > > >> public static int INDEX = 2; > > >> > > >> public static void main(String[] args) { > > >> Object[] o = new Object[10]; > > >> try { > > >> o[INDEX].hashCode(); > > >> } catch (Exception e) { > > >> e.printStackTrace(); > > >> } > > >> try { > > >> o["".hashCode()].hashCode(); > > >> } catch (Exception e) { > > >> e.printStackTrace(); > > >> } > > >> } > > >> } > > >> > > >> And 'Can not' should be 'Cannot'? > > >> > > >> Best regards, > > >> Ralf