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

Add a reliable way to retrieve the exception types thrown by a MethodHandle

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • None
    • core-libs
    • None

      Some implementations, such as the VarHandle combinator API added in jdk.incubator.foreign.MemoryHandles, want to check whether certain method handles can throw (checked) exceptions.

      Currently, there is no reliable way to retrieve that information for all kinds of method handles. Particularly BoundMehtodHandles are problematic, because the internal structure is complex.

      We should investigate adding a reliable way to either track or reverse-engineer the exception types that can be thrown by an arbitrary method handle. (And, perhaps expose the exception types through a public API as well).

            jvernee Jorn Vernee
            jvernee Jorn Vernee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: