Improve the exception message of MethodHandles::permuteArguments

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 16
    • Affects Version/s: 16
    • Component/s: core-libs

      Currently, if MethodHandles::permuteArguments is used with a reorder array that is the wrong size, or one of the indexes in it is out of bounds of the new type, we simply get the exception message:

          bad reorder array [...]

      We can improve the exception message by splitting these two error cases, and saying in the message exactly what went wrong.

      permuteArguments is a tricky API, and it's easy to use it in the wrong way. So, improving the error message here should help to improve developer productivity.

            Assignee:
            Jorn Vernee
            Reporter:
            Jorn Vernee
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: