MethodHandles.tryFinally throws IndexOutOfBoundsException for non-conforming parameter lists

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: None
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: