Uploaded image for project: 'Maven Compiler Plugin'
  1. Maven Compiler Plugin
  2. MCOMPILER-470

-parameters doesn't work with --release

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.8.1
    • 3.9.0, 3.10.0
    • None

    Description

      The parameters flag works when configuring the Java version with source and target, eg.

      <configuration>
        <source>11</source>
        <target>11</target>
        <parameters>true</parameters>
      </configuration>
      

      However, when configuring the Java version with release, as is the convention to use with Java 9+, the parameters flag no longer works (the .class file doesn't contain MethodParameters), eg.

      <configuration>
        <release>11</release>
        <parameters>true</parameters>
      </configuration>
      

       

      To ensure that the issue is not with javac, I've tested running javac with:

      javac --source 11 --target 11 -parameters MyClass.java
      

      and

      javac --release 11 -parameters MyClass.java
      

      and verified that it works for both (both .class files contain MethodParameters).

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            olamy Olivier Lamy
            daniel-shuy Daniel Shuy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment