Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6991528

Support making Throwable.suppressedExceptions immutable

XMLWordPrintable

    • b120
    • generic
    • generic
    • Not verified

      In discussions on coin-dev [1] and elsewhere, the need to support immutable Throwable objects in the JVM became evident. Such Throwables can be reused and do not require a fresh allocation (and stack trace creation) for each throw.

      Supporting this feature requires a number of changes to the suppressed exception feature added to support try-with-resources.

      In addition, renaming "getSuppressedExceptions" and "addSuppressedException" to "getSuppressed" and "addSuppressed" has been suggested [2].

      [1] http://mail.openjdk.java.net/pipermail/coin-dev/2010-August/002830.html
      [2] http://mail.openjdk.java.net/pipermail/coin-dev/2010-September/002908.html

            darcy Joe Darcy
            darcy Joe Darcy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: