Gábor Lipták created MNG-5662:
---------------------------------

             Summary: 
org.apache.maven.profiles.activation.JdkPrefixProfileActivator misuses 
String.replaceAll
                 Key: MNG-5662
                 URL: https://jira.codehaus.org/browse/MNG-5662
             Project: Maven
          Issue Type: Improvement
          Components: Profiles
            Reporter: Gábor Lipták
            Priority: Minor


Instead of this:
{code:java}
    private String convertJdkToMavenVersion( String jdk )
    {
        return jdk.replaceAll( "_", "-" );
    }
{code}

It should look like this:
{code:java}
    private String convertJdkToMavenVersion( String jdk )
    {
        return jdk.replace( '_', '-' );
    }

This would save the CPU from recompiling a regex in vain. Could make a 
performance improvement for projects using that profile activator massively.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to