Re: REASSERT Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-29 Thread David Holmes
Sorry this slipped through the cracks. Looks good to me. (Don't know if you already pushed it :) ) David On 25/04/2013 5:16 PM, Joe Darcy wrote: Hello, Responding to David's comment and some comments from Alan off-list, here is a variant which doesn't use suppressed exceptions in initCause, b

RE: REASSERT Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-25 Thread Jason Mehrens
racle.com; alan.bate...@oracle.com > Subject: Re: REASSERT Code review request for 8012044: Give more information > about self-suppression from Throwable.addSuppressed > CC: core-libs-dev@openjdk.java.net > > Hello, > > Responding to David's comment and some comments from Alan

Re: REASSERT Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-25 Thread Alan Bateman
On 25/04/2013 08:16, Joe Darcy wrote: Hello, Responding to David's comment and some comments from Alan off-list, here is a variant which doesn't use suppressed exceptions in initCause, but still passes along some information: http://cr.openjdk.java.net/~darcy/8012044.4 This looks reason

Re: REASSERT Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-25 Thread Joe Darcy
Hello, Responding to David's comment and some comments from Alan off-list, here is a variant which doesn't use suppressed exceptions in initCause, but still passes along some information: http://cr.openjdk.java.net/~darcy/8012044.4 Patch to Throwable: --- a/src/share/classes/java/lang/T

RE: REASSERT Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-23 Thread Jason Mehrens
> I still find the use of addSuppressed in initCause to be questionable. > Given: > > catch(SomeException s) { >sharedException.initCause(s); // oops already has a cause > throw sharedException; > } > > then the ISE isn't suppressing 's', but replacing/suppressing > sharedException in m

Re: REASSERT Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-23 Thread Remi Forax
On 04/23/2013 07:51 AM, Joe Darcy wrote: Hi David, On 04/22/2013 10:25 PM, David Holmes wrote: Hi Joe, On 23/04/2013 9:05 AM, Joseph Darcy wrote: Hello, Just reasserting the request for a review of the latest version of this patch: http://cr.openjdk.java.net/~darcy/8012044.2 I believe

Re: REASSERT Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-22 Thread Joe Darcy
Hi David, On 04/22/2013 10:25 PM, David Holmes wrote: Hi Joe, On 23/04/2013 9:05 AM, Joseph Darcy wrote: Hello, Just reasserting the request for a review of the latest version of this patch: http://cr.openjdk.java.net/~darcy/8012044.2 I believe this version does an appropriate job of p

Re: REASSERT Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-22 Thread David Holmes
Hi Joe, On 23/04/2013 9:05 AM, Joseph Darcy wrote: Hello, Just reasserting the request for a review of the latest version of this patch: http://cr.openjdk.java.net/~darcy/8012044.2 I believe this version does an appropriate job of propagating exception information when there is misuse of

Re: REASSERT Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-22 Thread Joseph Darcy
Hello, Just reasserting the request for a review of the latest version of this patch: http://cr.openjdk.java.net/~darcy/8012044.2 I believe this version does an appropriate job of propagating exception information when there is misuse of the methods on Throwable. Thanks, -Joe On 4/17

RE: Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-17 Thread Jason Mehrens
ore-libs-dev@openjdk.java.net; david.hol...@oracle.com > Subject: Re: Code review request for 8012044: Give more information about > self-suppression from Throwable.addSuppressed > > On 04/14/2013 07:36 PM, Joe Darcy wrote: > > On 04/12/2013 07:29 PM, Jason Mehrens wrote: > >> Joe, &

Re: Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-17 Thread Joe Darcy
On 04/14/2013 07:36 PM, Joe Darcy wrote: On 04/12/2013 07:29 PM, Jason Mehrens wrote: Joe, You'll have guard ise.addSuppressed against null. Looks good otherwise. private static void initCauseNull() { Throwable t1 = new Throwable(); t1.initCause(null); try { t1.initCa

RE: Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-15 Thread Jason Mehrens
o: joe.da...@oracle.com > CC: jason_mehr...@hotmail.com; core-libs-dev@openjdk.java.net > Subject: Re: Code review request for 8012044: Give more information about > self-suppression from Throwable.addSuppressed > > On 13/04/2013 5:08 AM, Joe Darcy wrote: > > On 04/12/2013 11:22 AM,

Re: Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-14 Thread David Holmes
On 13/04/2013 5:08 AM, Joe Darcy wrote: On 04/12/2013 11:22 AM, Jason Mehrens wrote: The landmines are the retrofitted exception classes as shown here https://netbeans.org/bugzilla/show_bug.cgi?id=150969 and https://issues.jboss.org/browse/JBREM-552. Really, if the ISE or IAE is thrown it is goi

Re: Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-14 Thread Joe Darcy
ion(NULL_CAUSE_MESSAGE); Cheers, -Joe Jason Date: Fri, 12 Apr 2013 12:08:07 -0700 From: joe.da...@oracle.com To: jason_mehr...@hotmail.com CC: core-libs-dev@openjdk.java.net Subject: Re: Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppr

RE: Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-12 Thread Jason Mehrens
2 Apr 2013 12:08:07 -0700 From: joe.da...@oracle.com To: jason_mehr...@hotmail.com CC: core-libs-dev@openjdk.java.net Subject: Re: Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed On 04/12/2013 11:22 AM, Jason Mehrens wrote: The landmines ar

Re: Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-12 Thread Joe Darcy
On 04/12/2013 11:22 AM, Jason Mehrens wrote: The landmines are the retrofitted exception classes as shown here https://netbeans.org/bugzilla/show_bug.cgi?id=150969 and https://issues.jboss.org/browse/JBREM-552. Really, if the ISE or IAE is thrown it is going to suppress 'this' and 'cause'. It

RE: Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-12 Thread Jason Mehrens
ee the given 'cause' show up in a log file when tracking down this type of bug. Date: Fri, 12 Apr 2013 10:35:40 -0700 From: joe.da...@oracle.com To: jason_mehr...@hotmail.com CC: core-libs-dev@openjdk.java.net Subject: Re: Code review request for 8012044: Give more informatio

Re: Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-12 Thread Joe Darcy
lied to the exceptions thrown from initCause? Seems like that would be consistent with this change. Jason > Date: Thu, 11 Apr 2013 18:19:30 -0700 > From: joe.da...@oracle.com > To: core-libs-dev@openjdk.java.net > Subject: Code review request for 8012044: Give more information about

RE: Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-12 Thread Jason Mehrens
012044: Give more information about > self-suppression from Throwable.addSuppressed > > Hello, > > Please review the patch below to address > > 8012044: Give more information about self-suppression from > Throwable.addSuppressed > http://cr.openjdk.java.net/~

Re: Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-12 Thread Peter Levart
Hi Joe, There were certainly debates about why self-suppression is not a good thing when project Coin's try-with-resources has been developed, but I don't quite remember the reason why it was designed this way. Couldn't the logic just make the self-suppression a no-op? The addSuppressed was d

Re: Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-11 Thread Zhong Yu
It doesn't feel very right to say the exception is the "cause" of the IAE. If the user code reuses an exception instance "x", as reported by OP, there is a possibility that the IAE is later added as a suppressed exception to "x", forming a loop x->IAE->x. Zhong Yu On Thu, Apr 11, 2013 at 8:19 P

Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed

2013-04-11 Thread Joe Darcy
Hello, Please review the patch below to address 8012044: Give more information about self-suppression from Throwable.addSuppressed http://cr.openjdk.java.net/~darcy/8012044.0/ Thanks, -Joe diff -r 006a7a576fe9 src/share/classes/java/lang/Throwable.java --- a/src/share/classes/java/l