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

Improve the exception message of MethodHandles::permuteArguments

    XMLWordPrintable

    Details

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

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: