You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Olivier Lamy (Jira)" <ji...@apache.org> on 2022/02/11 09:49:00 UTC

[jira] [Closed] (MCOMPILER-470) -parameters doesn't work with --release

     [ https://issues.apache.org/jira/browse/MCOMPILER-470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed MCOMPILER-470.
----------------------------------
      Assignee: Olivier Lamy
    Resolution: Fixed

Fixed with plexus compiler upgrade

> -parameters doesn't work with --release
> ---------------------------------------
>
>                 Key: MCOMPILER-470
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-470
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 3.8.1
>            Reporter: Daniel Shuy
>            Assignee: Olivier Lamy
>            Priority: Major
>             Fix For: 3.10.0
>
>
> The *parameters* flag works when configuring the Java version with *source* and *target*, eg.
> {code:java}
> <configuration>
>   <source>11</source>
>   <target>11</target>
>   <parameters>true</parameters>
> </configuration>
> {code}
> 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.
> {code:java}
> <configuration>
>   <release>11</release>
>   <parameters>true</parameters>
> </configuration>
> {code}
>  
> To ensure that the issue is not with *javac*, I've tested running *javac* with:
> {code:java}
> javac --source 11 --target 11 -parameters MyClass.java
> {code}
> and
> {code:java}
> javac --release 11 -parameters MyClass.java
> {code}
> and verified that it works for both (both *.class* files contain *MethodParameters*).



--
This message was sent by Atlassian Jira
(v8.20.1#820001)