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

Improve the exception message of MethodHandles::permuteArguments

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 16
    • 16
    • 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.

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

              Created:
              Updated:
              Resolved: