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

MethodHandles.tryFinally throws IndexOutOfBoundsException for non-conforming parameter lists

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • None
    • core-libs

      private static void target() {}
      private static void cleanup(Throwable t, int a1) {}

      Calling tryFinally on these leads to "IndexOutOfBoundsException: toIndex = 1", when I expected to get IllegalArgumentException.
      I think IllegalArgumentException description is OK, but the javadoc misses IndexOutOfBoundsException description.

            mhaupt Michael Haupt
            kfertikov Kirill Fertikov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: