Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-5662

org.apache.maven.profiles.activation.JdkPrefixProfileActivator misuses String.replaceAll

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • Profiles
    • None

    Description

      Instead of this:

          private String convertJdkToMavenVersion( String jdk )
          {
              return jdk.replaceAll( "_", "-" );
          }
      

      It should look like this:

          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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            gabor.liptak Gábor Lipták
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: