Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8166974 invokedynamic implementation should not wrap Errors
  3. JDK-8168606

Release Note: invokedynamic implementation should not wrap Errors

XMLWordPrintable

      The `invokedynamic` byte code instruction is no longer specified by the Java Virtual Machine Specification to wrap any `Throwable` thrown during linking in `java.lang.invoke.BootstrapMethodError`, which is then thrown to the caller.

      If during linking an instance of `Error`, or a subclass of, is thrown then that `Error` is no longer wrapped and is thrown directly to the caller. Any other instance of `Throwable`, or subclass of, is still wrapped in `java.lang.invoke.BootstrapMethodError`.

      This change in behaviour ensures that errors such as `OutOfMemoryError` or `ThreadDeath` are thrown unwrapped and may be acted on or reported directly, thereby enabling more uniform replacement of byte code with an `invokedynamic` instruction whose call site performs the same functionality as the replaced byte code (and may throw the same errors).

            psandoz Paul Sandoz
            psandoz Paul Sandoz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: