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

Do not retain declaration annotations on lambda formal parameters

    XMLWordPrintable

Details

    • Enhancement
    • Status: Closed
    • P4
    • Resolution: Fixed
    • 8u60
    • 9
    • tools
    • b93
    • Verified

    Description

      In JDK 8u40, javac dropped declaration annotations on lambda formals on the floor. Nothing in JLS8 suggested this treatment for such annotations, but it was a happy accident nonetheless -- according to Brian Goetz, there is no need to tie the synthetic method generated for a lambda expression back to the source lambda expression by carefully mapping the parameter annotations.

      in JDK 9 (and presumably in JDK 8u60), javac preserves declaration annotations on lambda formals as Runtime[In]VisibleParameterAnnotations in the synthetic method. Similar to the names of the lambda formals, this preservation should not happen. The covering JLS change is specified in JDK-8140279.

      Attachments

        Issue Links

          Activity

            People

              sadayapalam Srikanth Adayapalam (Inactive)
              abuckley Alex Buckley
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: