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

Daniel Shuy updated MCOMPILER-470:
----------------------------------
    Description: 
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*).

  was:
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, eg.
{code:java}
<configuration>
  <release>11</release>
  <parameters>true</parameters>
</configuration>
{code}
I'm not sure if the issue is with the *maven-compiler-plugin*, or *javac* 
itself.


> -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
>            Priority: Major
>
> 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.3.4#803005)

Reply via email to