You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@apache.org> on 2016/10/05 20:46:20 UTC

[jira] [Updated] (MCOMPILER-260) Incorrect behavior when multiple number 's have the same value

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

Robert Scholte updated MCOMPILER-260:
-------------------------------------
    Description: 
The following configuration:
{code:xml}
<compilerArgs>
    <arg>-Xmaxwarns</arg>
    <arg>7</arg>
    <arg>-Xmaxerrs</arg>
    <arg>7</arg>
</compilerArgs>
{code}
always fails, because the last 7 is not passed to javac. However, changing any of the numbers so that they're not equal, makes it succeed. Another case where it may succeed, is when an additional argument is appended. For example the following succeeds:
{code:xml}
<compilerArgs>
    <arg>-Xmaxwarns</arg>
    <arg>7</arg>
    <arg>-Xmaxerrs</arg>
    <arg>7</arg>
    <arg>-Werror</arg>
</compilerArgs>
{code}
However, this is not always the case. For example, the following fails:
{code:xml}
<compilerArgs>
    <arg>-Xmaxwarns</arg>
    <arg>7</arg>
    <arg>-source</arg>
    <arg>7</arg>
    <arg>-Werror</arg>
</compilerArgs>
{code}
Also note that the numbers do not necessarily have to be adjacent, e.g. the following fails as well:
{code:xml}
<compilerArgs>
    <arg>-Xmaxwarns</arg>
    <arg>7</arg>
    <arg>-source</arg>
    <arg>1.5</arg>
    <arg>-Xmaxerrs</arg>
    <arg>7</arg>
</compilerArgs>
{code}

  was:
The following configuration:

<compilerArgs>
    <arg>-Xmaxwarns</arg>
    <arg>7</arg>
    <arg>-Xmaxerrs</arg>
    <arg>7</arg>
</compilerArgs>

always fails, because the last 7 is not passed to javac. However, changing any of the numbers so that they're not equal, makes it succeed. Another case where it may succeed, is when an additional argument is appended. For example the following succeeds:

<compilerArgs>
    <arg>-Xmaxwarns</arg>
    <arg>7</arg>
    <arg>-Xmaxerrs</arg>
    <arg>7</arg>
    <arg>-Werror</arg>
</compilerArgs>

However, this is not always the case. For example, the following fails:

<compilerArgs>
    <arg>-Xmaxwarns</arg>
    <arg>7</arg>
    <arg>-source</arg>
    <arg>7</arg>
    <arg>-Werror</arg>
</compilerArgs>

Also note that the numbers do not necessarily have to be adjacent, e.g. the following fails as well:

<compilerArgs>
    <arg>-Xmaxwarns</arg>
    <arg>7</arg>
    <arg>-source</arg>
    <arg>1.5</arg>
    <arg>-Xmaxerrs</arg>
    <arg>7</arg>
</compilerArgs>



> Incorrect <compilerArgs> behavior when multiple number <arg>'s have the same value
> ----------------------------------------------------------------------------------
>
>                 Key: MCOMPILER-260
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-260
>             Project: Maven Compiler Plugin
>          Issue Type: Bug
>    Affects Versions: 3.3
>         Environment: JDK 1.8.0_45
> Maven 3.3.1
>            Reporter: Anthony Vanelverdinghe
>
> The following configuration:
> {code:xml}
> <compilerArgs>
>     <arg>-Xmaxwarns</arg>
>     <arg>7</arg>
>     <arg>-Xmaxerrs</arg>
>     <arg>7</arg>
> </compilerArgs>
> {code}
> always fails, because the last 7 is not passed to javac. However, changing any of the numbers so that they're not equal, makes it succeed. Another case where it may succeed, is when an additional argument is appended. For example the following succeeds:
> {code:xml}
> <compilerArgs>
>     <arg>-Xmaxwarns</arg>
>     <arg>7</arg>
>     <arg>-Xmaxerrs</arg>
>     <arg>7</arg>
>     <arg>-Werror</arg>
> </compilerArgs>
> {code}
> However, this is not always the case. For example, the following fails:
> {code:xml}
> <compilerArgs>
>     <arg>-Xmaxwarns</arg>
>     <arg>7</arg>
>     <arg>-source</arg>
>     <arg>7</arg>
>     <arg>-Werror</arg>
> </compilerArgs>
> {code}
> Also note that the numbers do not necessarily have to be adjacent, e.g. the following fails as well:
> {code:xml}
> <compilerArgs>
>     <arg>-Xmaxwarns</arg>
>     <arg>7</arg>
>     <arg>-source</arg>
>     <arg>1.5</arg>
>     <arg>-Xmaxerrs</arg>
>     <arg>7</arg>
> </compilerArgs>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)