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

Lambda Spec: Define lambda class behavior for generics/bridges

XMLWordPrintable

    • Verified

      Some low-level details of the class produced for lambdas and method references need to be made more precise in the spec when generics are involved.

      1) The methods that are overridden by the generated class are any methods in the _instantiated_ functional interface type (for example, Predicate<String>) for which the target function type ((String)->boolean) is a subsignature. (Some of these may be default methods.)

      2) The parameters are checked for ClassCastExceptions based on the erased target function type (similar to 15.12.4.5).

      This is consistent with the current behavior of javac (I think) and the LambdaMetafactory (per its own specification).

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

              Created:
              Updated:
              Resolved: