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 {

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

2013-04-17 Thread Jason Mehrens
; 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, You'll have guard ise.addSuppressed against null. Looks

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

2013-04-15 Thread Jason Mehrens
...@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, Jason Mehrens wrote: The landmines

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

2013-04-14 Thread Joe Darcy
, 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.addSuppressed On 04/12/2013 11:22 AM, Jason Mehrens wrote: The landmines

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

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

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

2013-04-12 Thread Jason Mehrens
Joe, Should this same logic be applied 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

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

2013-04-12 Thread Joe Darcy
Hi Jason, Hmm. This is the current initCause implementation from JDK 8: public synchronized Throwable initCause(Throwable cause) { if (this.cause != this) throw new IllegalStateException(Can't overwrite cause); if (cause == this) throw new

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

2013-04-12 Thread Jason Mehrens
' 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 information about self-suppression from

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