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

LambdaMetafactory: validate inputs and improve documentation

    XMLWordPrintable

Details

    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

              dlsmith Dan Smith
              dlsmith Dan Smith
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: