Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed (original) (raw)
Jason Mehrens jason_mehrens at hotmail.com
Mon Apr 15 12:04:59 UTC 2013
- Previous message: Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed
- Next message: hg: jdk8/tl/corba: Added tag jdk8-b85 for changeset 9583a6431596
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
David,
The last two paragraphs of Throwable.addSuppressed cover this. The first is your argument bellow and does not forbid anything it claims. The last paragraph explicitly enables this patch.
Jason
Date: Mon, 15 Apr 2013 12:56:42 +1000 From: david.holmes at oracle.com To: joe.darcy at oracle.com CC: jasonmehrens at hotmail.com; core-libs-dev at 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 are the retrofitted exception classes as shown here >> https://netbeans.org/bugzilla/showbug.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 would be >> nice to see the given 'cause' show up in a log file when tracking down >> this type of bug. > > Okay; fair enough. Updated webrev covering initCause too at > > http://cr.openjdk.java.net/~darcy/8012044.1/ > > New patch below. > > (It is a bit of stretch to have this in initiCause by listed as the > "cause" of the IllegalStateException; as an alternative, the > IllegalStateException could have both this and the cause as suppressed > exceptions.) I don't think that is valid for initCause. If I call initCause twice in succession there need not even be any exception propagation in progress. The ISE that gets thrown is not suppressing anything. For setSuppressed this might make sense for the compiler generated sequences, but again if I just called setSuppressed with an invalid value, the ISE is not suppressing any existing exception. David
- Previous message: Code review request for 8012044: Give more information about self-suppression from Throwable.addSuppressed
- Next message: hg: jdk8/tl/corba: Added tag jdk8-b85 for changeset 9583a6431596
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]