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

Joe Darcy joe.darcy at oracle.com
Fri Apr 12 01:19:30 UTC 2013


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/lang/Throwable.java Thu Apr 11 12:22:23 2013 +0900 +++ b/src/share/classes/java/lang/Throwable.java Thu Apr 11 18:16:38 2013 -0700 @@ -1039,7 +1039,7 @@ */ public final synchronized void addSuppressed(Throwable exception) { if (exception == this)

IllegalArgumentException(SELF_SUPPRESSION_MESSAGE, exception);

      if (exception == null)
          throw new NullPointerException(NULL_CAUSE_MESSAGE);

diff -r 006a7a576fe9 test/java/lang/Throwable/SuppressedExceptions.java --- a/test/java/lang/Throwable/SuppressedExceptions.java Thu Apr 11 12:22:23 2013 +0900 +++ b/test/java/lang/Throwable/SuppressedExceptions.java Thu Apr 11 18:16:38 2013 -0700 @@ -26,7 +26,7 @@

/*

self-suppresion not thrown."); } catch (IllegalArgumentException iae) {

self-suppresion."); } }

-Joe



More information about the core-libs-dev mailing list