[Updated] (SUREFIRE-1391) System Property variables processed twice in calculation of effective properties

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Updated] (SUREFIRE-1391) System Property variables processed twice in calculation of effective properties

JIRA jira@apache.org

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

Andrew Cohen updated SUREFIRE-1391:
-----------------------------------
    Description:
System property variables are processed twice in the calculation of effective properties. There is obviously no adverse impact on behavior, just unnecessary processing.

{code:java}
static SurefireProperties calculateEffectiveProperties( Properties systemProperties,
                                                            Map<String, String> systemPropertyVariables,
                                                            Properties userProperties, SurefireProperties props )
    {
        SurefireProperties result = new SurefireProperties();
        result.copyPropertiesFrom( systemProperties );

        result.copyPropertiesFrom( props );

        copyProperties( result, systemPropertyVariables );
        copyProperties( result, systemPropertyVariables );

        // We used to take all of our system properties and dump them in with the
        // user specified properties for SUREFIRE-121, causing SUREFIRE-491.
        // Not gonna do THAT any more... instead, we only propagate those system properties
        // that have been explicitly specified by the user via -Dkey=value on the CLI

        result.copyPropertiesFrom( userProperties );
        return result;
    }
{code}


  was:
System property variables are processed twice in the calculation of effective properties. There is obviously no adverse impact on behavior, just unnecessary processing.

{code:java}
static SurefireProperties calculateEffectiveProperties( Properties systemProperties,
                                                            Map<String, String> systemPropertyVariables,
                                                            Properties userProperties, SurefireProperties props )
    {
        SurefireProperties result = new SurefireProperties();
        result.copyPropertiesFrom( systemProperties );

        result.copyPropertiesFrom( props );

        {color:red}copyProperties( result, systemPropertyVariables );
        copyProperties( result, systemPropertyVariables );{color}

        // We used to take all of our system properties and dump them in with the
        // user specified properties for SUREFIRE-121, causing SUREFIRE-491.
        // Not gonna do THAT any more... instead, we only propagate those system properties
        // that have been explicitly specified by the user via -Dkey=value on the CLI

        result.copyPropertiesFrom( userProperties );
        return result;
    }
{code}



> System Property variables processed twice in calculation of effective properties
> --------------------------------------------------------------------------------
>
>                 Key: SUREFIRE-1391
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1391
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>            Reporter: Andrew Cohen
>            Priority: Trivial
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> System property variables are processed twice in the calculation of effective properties. There is obviously no adverse impact on behavior, just unnecessary processing.
> {code:java}
> static SurefireProperties calculateEffectiveProperties( Properties systemProperties,
>                                                             Map<String, String> systemPropertyVariables,
>                                                             Properties userProperties, SurefireProperties props )
>     {
>         SurefireProperties result = new SurefireProperties();
>         result.copyPropertiesFrom( systemProperties );
>         result.copyPropertiesFrom( props );
>         copyProperties( result, systemPropertyVariables );
>         copyProperties( result, systemPropertyVariables );
>         // We used to take all of our system properties and dump them in with the
>         // user specified properties for SUREFIRE-121, causing SUREFIRE-491.
>         // Not gonna do THAT any more... instead, we only propagate those system properties
>         // that have been explicitly specified by the user via -Dkey=value on the CLI
>         result.copyPropertiesFrom( userProperties );
>         return result;
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
Loading...