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

LambdaMetafactory: validate inputs and improve documentation

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 9
    • Fix Version/s: 13
    • Component/s: core-libs

      Description

      The LambdaMetafactory.metafactory and LambdaMetafactory.altMetafactory methods throw various RuntimeExceptions when given bad inputs, often because assumptions about the inputs turn out not to hold. These error conditions need to be specified, and the set of possible exception types should be reduced.

      Current behavior is to throw any of:
      NullPointerException
      IndexOutOfBoundsException
      ClassCastException
      NegativeArraySizeException
      ArrayStoreException
      IllegalArgumentException
      SecurityException
      LambdaConversionException

      No error occurs if altMetafactory's 'args' has unexpected trailing components.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dlsmith Dan Smith
                Reporter:
                dlsmith Dan Smith
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated: