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

javac -parameters does not emit parameter names for lambda expressions

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8
    • Fix Version/s: 9
    • Component/s: tools
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b47
    • Verification:
      Verified

      Backports

        Description

        As reported at [1], the synthetic method emitted for a lambda expression does not have a MethodParameters attribute, even when javac -parameters is specified. This is an oversight, as other attributes are generated as expected for the synthetic method, e.g. Runtime[In]VisibleTypeAnnotations for annotations on types of lambda formal parameters.

        [1] http://mail.openjdk.java.net/pipermail/type-annotations-spec-comments/2014-March/000071.html

          Issue Links

            Activity

            Hide
            sadayapalam Srikanth Adayapalam added a comment -
            com.sun.tools.javac.jvm.ClassWriter#writeMethodParametersAttr looks at MethodSymbol#params, but this is not initialized by com.sun.tools.javac.comp.LambdaToMethod.LambdaAnalyzerPreprocessor.LambdaTranslationContext#complete
            I have a preliminary fix for the problem.
            Show
            sadayapalam Srikanth Adayapalam added a comment - com.sun.tools.javac.jvm.ClassWriter#writeMethodParametersAttr looks at MethodSymbol#params, but this is not initialized by com.sun.tools.javac.comp.LambdaToMethod.LambdaAnalyzerPreprocessor.LambdaTranslationContext#complete I have a preliminary fix for the problem.
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/dev/langtools/rev/441711fd360d
            User: jlahoda
            Date: 2015-01-13 12:02:38 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/langtools/rev/441711fd360d User: jlahoda Date: 2015-01-13 12:02:38 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/langtools/rev/441711fd360d
            User: lana
            Date: 2015-01-21 21:54:44 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/langtools/rev/441711fd360d User: lana Date: 2015-01-21 21:54:44 +0000

              People

              • Assignee:
                sadayapalam Srikanth Adayapalam
                Reporter:
                abuckley Alex Buckley
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: