maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From schu...@apache.org
Subject [01/12] maven git commit: [MNG-5934] String handling issues identified by PMD [Forced Update!]
Date Sun, 12 Feb 2017 13:53:56 GMT
Repository: maven
Updated Branches:
  refs/heads/DEPMGMT-INCLUDE-IT 8690545d9 -> c07fa8675 (forced update)


[MNG-5934] String handling issues identified by PMD


Project: http://git-wip-us.apache.org/repos/asf/maven/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven/commit/8d91726f
Tree: http://git-wip-us.apache.org/repos/asf/maven/tree/8d91726f
Diff: http://git-wip-us.apache.org/repos/asf/maven/diff/8d91726f

Branch: refs/heads/DEPMGMT-INCLUDE-IT
Commit: 8d91726f7872f4462d9fa085ef5b6f32bfd0a2e1
Parents: 0514c1b
Author: Alex Henrie <alexhenrie24@gmail.com>
Authored: Tue Jan 19 20:04:59 2016 +0100
Committer: Michael Osipov <michaelo@apache.org>
Committed: Sat Feb 11 14:08:24 2017 +0100

----------------------------------------------------------------------
 .../apache/maven/artifact/DefaultArtifact.java  | 12 +++++------
 .../repository/ArtifactRepositoryPolicy.java    |  2 +-
 .../AbstractArtifactResolutionException.java    | 10 ++++-----
 .../MultipleArtifactsNotFoundException.java     |  3 ++-
 .../versioning/DefaultArtifactVersion.java      |  2 +-
 .../maven/artifact/versioning/Restriction.java  |  6 +++---
 .../maven/artifact/versioning/VersionRange.java |  6 +++---
 .../apache/maven/building/DefaultProblem.java   |  2 +-
 .../repository/DefaultArtifactRepository.java   |  8 +++----
 .../artifact/versioning/ManagedVersionMap.java  |  4 ++--
 .../validation/ModelValidationResult.java       |  2 +-
 .../repository/MetadataResolutionResult.java    | 22 +++++++++-----------
 .../repository/metadata/MetadataGraph.java      |  6 +++---
 .../metadata/MetadataGraphVertex.java           |  8 +++----
 .../project/LegacyLocalRepositoryManager.java   |  2 +-
 .../AbstractProjectInheritanceTestCase.java     |  2 +-
 .../repository/MavenArtifactRepository.java     | 14 ++++++-------
 .../metadata/AbstractRepositoryMetadata.java    |  2 +-
 .../resolver/ArtifactResolutionResult.java      |  8 +++----
 .../maven/lifecycle/mapping/LifecyclePhase.java |  2 +-
 .../org/apache/maven/plugin/MojoExecution.java  |  2 +-
 .../maven/plugin/PluginParameterException.java  |  6 +++---
 .../PluginParameterExpressionEvaluator.java     | 16 +++++++-------
 .../DefaultProjectDependenciesResolver.java     |  4 ++--
 .../org/apache/maven/project/MavenProject.java  |  4 ++--
 .../maven/repository/ArtifactTransferEvent.java | 10 ++++-----
 .../metadata/AbstractArtifactMetadata.java      |  2 +-
 .../project/LegacyLocalRepositoryManager.java   |  2 +-
 .../org/apache/maven/cli/CLIReportingUtils.java |  2 +-
 .../java/org/apache/maven/cli/MavenCli.java     |  2 +-
 .../maven/cli/event/ExecutionEventLogger.java   |  4 ++--
 .../UnsupportedSlf4jBindingConfiguration.java   |  2 +-
 .../maven/cli/CLIManagerDocumentationTest.java  |  2 +-
 .../model/building/DefaultModelBuilder.java     |  8 +++----
 .../model/building/DefaultModelProblem.java     |  2 +-
 .../maven/model/building/ModelProblemUtils.java |  2 +-
 .../maven/plugin/MojoNotFoundException.java     |  2 +-
 .../building/DefaultSettingsProblem.java        |  2 +-
 38 files changed, 98 insertions(+), 99 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
----------------------------------------------------------------------
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java b/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
index 147e88e..bd2e8ed 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/DefaultArtifact.java
@@ -230,7 +230,7 @@ public class DefaultArtifact
     {
         StringBuilder sb = new StringBuilder( 128 );
         sb.append( getGroupId() );
-        sb.append( ":" );
+        sb.append( ':' );
         appendArtifactTypeClassifierString( sb );
         return sb.toString();
     }
@@ -238,11 +238,11 @@ public class DefaultArtifact
     private void appendArtifactTypeClassifierString( StringBuilder sb )
     {
         sb.append( getArtifactId() );
-        sb.append( ":" );
+        sb.append( ':' );
         sb.append( getType() );
         if ( hasClassifier() )
         {
-            sb.append( ":" );
+            sb.append( ':' );
             sb.append( getClassifier() );
         }
     }
@@ -285,10 +285,10 @@ public class DefaultArtifact
         if ( getGroupId() != null )
         {
             sb.append( getGroupId() );
-            sb.append( ":" );
+            sb.append( ':' );
         }
         appendArtifactTypeClassifierString( sb );
-        sb.append( ":" );
+        sb.append( ':' );
         if ( getBaseVersionInternal() != null )
         {
             sb.append( getBaseVersionInternal() );
@@ -299,7 +299,7 @@ public class DefaultArtifact
         }
         if ( scope != null )
         {
-            sb.append( ":" );
+            sb.append( ':' );
             sb.append( scope );
         }
         return sb.toString();

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java
----------------------------------------------------------------------
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java
index b6cd8f3..c5d2473 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/repository/ArtifactRepositoryPolicy.java
@@ -160,7 +160,7 @@ public class ArtifactRepositoryPolicy
         buffer.append( checksumPolicy );
         buffer.append( ", updates=" );
         buffer.append( updatePolicy );
-        buffer.append( "}" );
+        buffer.append( '}' );
         return buffer.toString();
     }
 

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java
----------------------------------------------------------------------
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java
index 66e147c..b63428e 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/AbstractArtifactResolutionException.java
@@ -175,7 +175,7 @@ public class AbstractArtifactResolutionException
             for ( Iterator<String> i = path.iterator(); i.hasNext(); num++ )
             {
                 sb.append( indentation );
-                sb.append( "\t" );
+                sb.append( '\t' );
                 sb.append( num );
                 sb.append( ") " );
                 sb.append( i.next() );
@@ -201,8 +201,8 @@ public class AbstractArtifactResolutionException
         if ( message == null || !message.contains( "from the specified remote repositories:" ) )
         {
             sb.append( LS );
-            sb.append( "  " ).append( groupId ).append( ":" ).append( artifactId ).append( ":" ).append( type ).append(
-                ":" ).append( version );
+            sb.append( "  " ).append( groupId ).append( ':' ).append( artifactId ).append( ':' ).append( type ).append(
+                ':' ).append( version );
             sb.append( LS );
             if ( remoteRepositories != null )
             {
@@ -235,10 +235,10 @@ public class AbstractArtifactResolutionException
                         sb.append( ", snapshots=" ).append( snapshots.isEnabled() );
                     }
 
-                    sb.append( ")" );
+                    sb.append( ')' );
                     if ( i.hasNext() )
                     {
-                        sb.append( "," ).append( LS ).append( "  " );
+                        sb.append( ',' ).append( LS ).append( "  " );
                     }
                 }
             }

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/MultipleArtifactsNotFoundException.java
----------------------------------------------------------------------
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/MultipleArtifactsNotFoundException.java b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/MultipleArtifactsNotFoundException.java
index 0f13db1..896710f 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/MultipleArtifactsNotFoundException.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/resolver/MultipleArtifactsNotFoundException.java
@@ -84,8 +84,9 @@ public class MultipleArtifactsNotFoundException
 
     private static String constructMessage( List<Artifact> artifacts )
     {
-        StringBuilder buffer = new StringBuilder( "Missing:\n" );
+        StringBuilder buffer = new StringBuilder( 256 );
 
+        buffer.append( "Missing:\n" );
         buffer.append( "----------\n" );
 
         int counter = 0;

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
----------------------------------------------------------------------
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
index b5e43d4..81a52b8 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/DefaultArtifactVersion.java
@@ -111,7 +111,7 @@ public class DefaultArtifactVersion
     {
         comparable = new ComparableVersion( version );
 
-        int index = version.indexOf( "-" );
+        int index = version.indexOf( '-' );
 
         String part1;
         String part2 = null;

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/Restriction.java
----------------------------------------------------------------------
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/Restriction.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/Restriction.java
index d73d7ea..c728e9f 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/Restriction.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/Restriction.java
@@ -178,17 +178,17 @@ public class Restriction
     {
         StringBuilder buf = new StringBuilder();
 
-        buf.append( isLowerBoundInclusive() ? "[" : "(" );
+        buf.append( isLowerBoundInclusive() ? '[' : '(' );
         if ( getLowerBound() != null )
         {
             buf.append( getLowerBound().toString() );
         }
-        buf.append( "," );
+        buf.append( ',' );
         if ( getUpperBound() != null )
         {
             buf.append( getUpperBound().toString() );
         }
-        buf.append( isUpperBoundInclusive() ? "]" : ")" );
+        buf.append( isUpperBoundInclusive() ? ']' : ')' );
 
         return buf.toString();
     }

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java
----------------------------------------------------------------------
diff --git a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java
index 0d094ef..7181db0 100644
--- a/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java
+++ b/maven-artifact/src/main/java/org/apache/maven/artifact/versioning/VersionRange.java
@@ -104,8 +104,8 @@ public class VersionRange
 
         while ( process.startsWith( "[" ) || process.startsWith( "(" ) )
         {
-            int index1 = process.indexOf( ")" );
-            int index2 = process.indexOf( "]" );
+            int index1 = process.indexOf( ')' );
+            int index2 = process.indexOf( ']' );
 
             int index = index2;
             if ( index2 < 0 || index1 < index2 )
@@ -171,7 +171,7 @@ public class VersionRange
 
         Restriction restriction;
 
-        int index = process.indexOf( "," );
+        int index = process.indexOf( ',' );
 
         if ( index < 0 )
         {

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-builder-support/src/main/java/org/apache/maven/building/DefaultProblem.java
----------------------------------------------------------------------
diff --git a/maven-builder-support/src/main/java/org/apache/maven/building/DefaultProblem.java b/maven-builder-support/src/main/java/org/apache/maven/building/DefaultProblem.java
index ad1fc40..427eb2c 100644
--- a/maven-builder-support/src/main/java/org/apache/maven/building/DefaultProblem.java
+++ b/maven-builder-support/src/main/java/org/apache/maven/building/DefaultProblem.java
@@ -151,7 +151,7 @@ class DefaultProblem
     {
         StringBuilder buffer = new StringBuilder( 128 );
 
-        buffer.append( "[" ).append( getSeverity() ).append( "] " );
+        buffer.append( '[' ).append( getSeverity() ).append( "] " );
         buffer.append( getMessage() );
         buffer.append( " @ " ).append( getLocation() );
 

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepository.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepository.java b/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepository.java
index e0a5587..f5db5ef 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepository.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultArtifactRepository.java
@@ -175,11 +175,11 @@ public class DefaultArtifactRepository
 
     public String toString()
     {
-        StringBuilder sb = new StringBuilder();
+        StringBuilder sb = new StringBuilder( 256 );
 
-        sb.append( "       id: " ).append( getId() ).append( "\n" );
-        sb.append( "      url: " ).append( getUrl() ).append( "\n" );
-        sb.append( "   layout: " ).append( layout != null ? layout : "none" ).append( "\n" );
+        sb.append( "       id: " ).append( getId() ).append( '\n' );
+        sb.append( "      url: " ).append( getUrl() ).append( '\n' );
+        sb.append( "   layout: " ).append( layout != null ? layout : "none" ).append( '\n' );
 
         if ( snapshots != null )
         {

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java b/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java
index 86b4949..02ac24c 100644
--- a/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java
+++ b/maven-compat/src/main/java/org/apache/maven/artifact/versioning/ManagedVersionMap.java
@@ -45,10 +45,10 @@ public class ManagedVersionMap
         while ( iter.hasNext() )
         {
             String key = iter.next();
-            buffer.append( key ).append( "=" ).append( get( key ) );
+            buffer.append( key ).append( '=' ).append( get( key ) );
             if ( iter.hasNext() )
             {
-                buffer.append( "\n" );
+                buffer.append( '\n' );
             }
         }
         return buffer.toString();

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-compat/src/main/java/org/apache/maven/project/validation/ModelValidationResult.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/project/validation/ModelValidationResult.java b/maven-compat/src/main/java/org/apache/maven/project/validation/ModelValidationResult.java
index ad94fe0..5033b99 100644
--- a/maven-compat/src/main/java/org/apache/maven/project/validation/ModelValidationResult.java
+++ b/maven-compat/src/main/java/org/apache/maven/project/validation/ModelValidationResult.java
@@ -85,7 +85,7 @@ public class ModelValidationResult
 //
         for ( int i = 0; i < messages.size(); i++ )
         {
-            message.append( indentation ).append( "[" ).append( i ).append( "]  " ).append( messages.get( i ) ).append(
+            message.append( indentation ).append( '[' ).append( i ).append( "]  " ).append( messages.get( i ) ).append(
                 NEWLINE );
         }
 

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java
index bd5436c..906d0f6 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/MetadataResolutionResult.java
@@ -322,21 +322,19 @@ public class MetadataResolutionResult
 
     public String toString()
     {
-        StringBuilder sb = new StringBuilder();
+        if ( artifacts == null )
+            return "";
 
-        if ( artifacts != null )
+        StringBuilder sb = new StringBuilder( 256 );
+        int i = 1;
+        sb.append( "---------\n" );
+        sb.append( artifacts.size() ).append( '\n' );
+        for ( Artifact a : artifacts )
         {
-            int i = 1;
-            sb.append( "---------" ).append( "\n" );
-            sb.append( artifacts.size() ).append( "\n" );
-            for ( Artifact a : artifacts )
-            {
-                sb.append( i ).append( " " ).append( a ).append( "\n" );
-                i++;
-            }
-            sb.append( "---------" ).append( "\n" );
+            sb.append( i ).append( ' ' ).append( a ).append( '\n' );
+            i++;
         }
-
+        sb.append( "---------\n" );
         return sb.toString();
     }
 

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java
index 4bcca4c..532cd3c 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraph.java
@@ -486,13 +486,13 @@ public class MetadataGraph
         }
         for ( MetadataGraphVertex v : vertices )
         {
-            sb.append( "Vertex:  " ).append( v.getMd().toString() ).append( "\n" );
+            sb.append( "Vertex:  " ).append( v.getMd().toString() ).append( '\n' );
             List<MetadataGraphEdge> ins = getIncidentEdges( v );
             if ( ins != null )
             {
                 for ( MetadataGraphEdge e : ins )
                 {
-                    sb.append( "       from :  " ).append( e.toString() ).append( "\n" );
+                    sb.append( "       from :  " ).append( e.toString() ).append( '\n' );
                 }
             }
             else
@@ -505,7 +505,7 @@ public class MetadataGraph
             {
                 for ( MetadataGraphEdge e : outs )
                 {
-                    sb.append( "        to :  " ).append( e.toString() ).append( "\n" );
+                    sb.append( "        to :  " ).append( e.toString() ).append( '\n' );
                 }
             }
             else

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphVertex.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphVertex.java b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphVertex.java
index eb87121..495d061 100644
--- a/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphVertex.java
+++ b/maven-compat/src/main/java/org/apache/maven/repository/metadata/MetadataGraphVertex.java
@@ -192,17 +192,17 @@ public class MetadataGraphVertex
             return super.hashCode();
         }
         StringBuilder hashString = new StringBuilder( 128 );
-        hashString.append( md.groupId ).append( "|" );
-        hashString.append( md.artifactId ).append( "|" );
+        hashString.append( md.groupId ).append( '|' );
+        hashString.append( md.artifactId ).append( '|' );
 
         if ( compareVersion )
         {
-            hashString.append( md.version ).append( "|" );
+            hashString.append( md.version ).append( '|' );
         }
 
         if ( compareScope )
         {
-            hashString.append( md.getArtifactScope() ).append( "|" );
+            hashString.append( md.getArtifactScope() ).append( '|' );
         }
 
         return hashString.toString().hashCode();

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-compat/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java b/maven-compat/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java
index 52fdd80..c919cdf 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java
@@ -59,7 +59,7 @@ public class LegacyLocalRepositoryManager
 
         path.append( artifact.getGroupId() ).append( '/' );
 
-        path.append( artifact.getExtension() ).append( 's' ).append( '/' );
+        path.append( artifact.getExtension() ).append( "s/" );
 
         path.append( artifact.getArtifactId() ).append( '-' ).append( artifact.getVersion() );
 

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-compat/src/test/java/org/apache/maven/project/inheritance/AbstractProjectInheritanceTestCase.java
----------------------------------------------------------------------
diff --git a/maven-compat/src/test/java/org/apache/maven/project/inheritance/AbstractProjectInheritanceTestCase.java b/maven-compat/src/test/java/org/apache/maven/project/inheritance/AbstractProjectInheritanceTestCase.java
index 413d6fe..93358ec 100644
--- a/maven-compat/src/test/java/org/apache/maven/project/inheritance/AbstractProjectInheritanceTestCase.java
+++ b/maven-compat/src/test/java/org/apache/maven/project/inheritance/AbstractProjectInheritanceTestCase.java
@@ -33,7 +33,7 @@ public abstract class AbstractProjectInheritanceTestCase
     {
         String className = getClass().getPackage().getName();
 
-        return className.substring( className.lastIndexOf( "." ) + 1 );
+        return className.substring( className.lastIndexOf( '.' ) + 1 );
     }
 
     protected File projectFile( String name )

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java
index 450d139..38ae6bb 100644
--- a/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java
+++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/MavenArtifactRepository.java
@@ -132,15 +132,15 @@ public class MavenArtifactRepository
 
     public String toString()
     {
-        StringBuilder sb = new StringBuilder();
+        StringBuilder sb = new StringBuilder( 256 );
 
-        sb.append( "      id: " ).append( getId() ).append( "\n" );
-        sb.append( "      url: " ).append( getUrl() ).append( "\n" );
-        sb.append( "   layout: " ).append( layout != null ? layout : "none" ).append( "\n" );
+        sb.append( "      id: " ).append( getId() ).append( '\n' );
+        sb.append( "      url: " ).append( getUrl() ).append( '\n' );
+        sb.append( "   layout: " ).append( layout != null ? layout : "none" ).append( '\n' );
 
         if ( proxy != null )
         {
-            sb.append( "    proxy: " ).append( proxy.getHost() ).append( ":" ).append( proxy.getPort() ).append( "\n" );
+            sb.append( "    proxy: " ).append( proxy.getHost() ).append( ':' ).append( proxy.getPort() ).append( '\n' );
         }
 
         if ( snapshots != null )
@@ -220,7 +220,7 @@ public class MavenArtifactRepository
      */
     private static String protocol( final String url )
     {
-        final int pos = url.indexOf( ":" );
+        final int pos = url.indexOf( ':' );
 
         if ( pos == -1 )
         {
@@ -257,7 +257,7 @@ public class MavenArtifactRepository
                 else
                 {
                     // Now we expect the host
-                    int index = retValue.indexOf( "/" );
+                    int index = retValue.indexOf( '/' );
                     if ( index >= 0 )
                     {
                         retValue = retValue.substring( index + 1 );

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/AbstractRepositoryMetadata.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/AbstractRepositoryMetadata.java b/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/AbstractRepositoryMetadata.java
index 0528417..37e69e5 100644
--- a/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/AbstractRepositoryMetadata.java
+++ b/maven-core/src/main/java/org/apache/maven/artifact/repository/metadata/AbstractRepositoryMetadata.java
@@ -197,7 +197,7 @@ public abstract class AbstractRepositoryMetadata
 
     public String extendedToString()
     {
-        StringBuilder buffer = new StringBuilder();
+        StringBuilder buffer = new StringBuilder( 256 );
 
         buffer.append( "\nRepository Metadata\n--------------------------" );
         buffer.append( "\nGroupId: " ).append( getGroupId() );

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java b/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java
index 07331f2..2bad1a7 100644
--- a/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java
+++ b/maven-core/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionResult.java
@@ -343,14 +343,14 @@ public class ArtifactResolutionResult
         if ( artifacts != null )
         {
             int i = 1;
-            sb.append( "---------" ).append( "\n" );
-            sb.append( artifacts.size() ).append( "\n" );
+            sb.append( "---------\n" );
+            sb.append( artifacts.size() ).append( '\n' );
             for ( Artifact a : artifacts )
             {
-                sb.append( i ).append( " " ).append( a ).append( "\n" );
+                sb.append( i ).append( ' ' ).append( a ).append( '\n' );
                 i++;
             }
-            sb.append( "---------" ).append( "\n" );
+            sb.append( "---------\n" );
         }
 
         return sb.toString();

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java
index 059f234..295e642 100644
--- a/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java
+++ b/maven-core/src/main/java/org/apache/maven/lifecycle/mapping/LifecyclePhase.java
@@ -84,7 +84,7 @@ public class LifecyclePhase
                 }
                 else
                 {
-                    sb.append( "," );
+                    sb.append( ',' );
                 }
                 sb.append( mojo.getGoal() );
             }

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java b/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java
index bf053cc..71ece87 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/MojoExecution.java
@@ -175,7 +175,7 @@ public class MojoExecution
         {
             buffer.append( mojoDescriptor.getId() );
         }
-        buffer.append( " {execution: " ).append( executionId ).append( "}" );
+        buffer.append( " {execution: " ).append( executionId ).append( '}' );
         return buffer.toString();
     }
 

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java
index dcf459e..5f431e0 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterException.java
@@ -151,7 +151,7 @@ public class PluginParameterException
 
         if ( StringUtils.isEmpty( expression ) )
         {
-            messageBuffer.append( "." );
+            messageBuffer.append( '.' );
         }
         else
         {
@@ -172,7 +172,7 @@ public class PluginParameterException
         MojoDescriptor mojo = getMojoDescriptor();
 
         messageBuffer.append( "One or more required plugin parameters are invalid/missing for \'" )
-            .append( mojo.getPluginDescriptor().getGoalPrefix() ).append( ":" ).append( mojo.getGoal() )
+            .append( mojo.getPluginDescriptor().getGoalPrefix() ).append( ':' ).append( mojo.getGoal() )
             .append( "\'\n" );
 
         int idx = 0;
@@ -184,7 +184,7 @@ public class PluginParameterException
 
             decomposeParameterIntoUserInstructions( mojo, param, messageBuffer );
 
-            messageBuffer.append( "\n" );
+            messageBuffer.append( '\n' );
         }
 
         return messageBuffer.toString();

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
index 9199ba5..a7eeb4e 100644
--- a/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
+++ b/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java
@@ -160,7 +160,7 @@ public class PluginParameterExpressionEvaluator
             int index = expr.indexOf( "${" );
             if ( index >= 0 )
             {
-                int lastIndex = expr.indexOf( "}", index );
+                int lastIndex = expr.indexOf( '}', index );
                 if ( lastIndex >= 0 )
                 {
                     String retVal = expr.substring( 0, index );
@@ -213,7 +213,7 @@ public class PluginParameterExpressionEvaluator
         {
             try
             {
-                int pathSeparator = expression.indexOf( "/" );
+                int pathSeparator = expression.indexOf( '/' );
 
                 if ( pathSeparator > 0 )
                 {
@@ -253,7 +253,7 @@ public class PluginParameterExpressionEvaluator
         {
             try
             {
-                int pathSeparator = expression.indexOf( "/" );
+                int pathSeparator = expression.indexOf( '/' );
 
                 if ( pathSeparator > 0 )
                 {
@@ -285,7 +285,7 @@ public class PluginParameterExpressionEvaluator
         {
             try
             {
-                int pathSeparator = expression.indexOf( "/" );
+                int pathSeparator = expression.indexOf( '/' );
 
                 if ( pathSeparator > 0 )
                 {
@@ -313,7 +313,7 @@ public class PluginParameterExpressionEvaluator
         {
             try
             {
-                int pathSeparator = expression.indexOf( "/" );
+                int pathSeparator = expression.indexOf( '/' );
 
                 PluginDescriptor pluginDescriptor = mojoDescriptor.getPluginDescriptor();
 
@@ -342,7 +342,7 @@ public class PluginParameterExpressionEvaluator
         {
             try
             {
-                int pathSeparator = expression.indexOf( "/" );
+                int pathSeparator = expression.indexOf( '/' );
 
                 if ( pathSeparator > 0 )
                 {
@@ -368,7 +368,7 @@ public class PluginParameterExpressionEvaluator
         }
         else if ( expression.startsWith( "basedir" ) )
         {
-            int pathSeparator = expression.indexOf( "/" );
+            int pathSeparator = expression.indexOf( '/' );
 
             if ( pathSeparator > 0 )
             {
@@ -447,7 +447,7 @@ public class PluginParameterExpressionEvaluator
 
     private String stripTokens( String expr )
     {
-        if ( expr.startsWith( "${" ) && ( expr.indexOf( "}" ) == expr.length() - 1 ) )
+        if ( expr.startsWith( "${" ) && ( expr.indexOf( '}' ) == expr.length() - 1 ) )
         {
             expr = expr.substring( 2, expr.length() - 1 );
         }

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java
index 2486057..16b60c2 100644
--- a/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java
+++ b/maven-core/src/main/java/org/apache/maven/project/DefaultProjectDependenciesResolver.java
@@ -263,7 +263,7 @@ public class DefaultProjectDependenciesResolver
                 {
                     buffer.append( " (scope managed from " ).append( premanagedScope );
                     appendManagementSource( buffer, art, "scope" );
-                    buffer.append( ")" );
+                    buffer.append( ')' );
                 }
 
                 String premanagedVersion = DependencyManagerUtils.getPremanagedVersion( node );
@@ -271,7 +271,7 @@ public class DefaultProjectDependenciesResolver
                 {
                     buffer.append( " (version managed from " ).append( premanagedVersion );
                     appendManagementSource( buffer, art, "version" );
-                    buffer.append( ")" );
+                    buffer.append( ')' );
                 }
             }
             else

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/project/MavenProject.java b/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
index 952622f..77206bd 100644
--- a/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
+++ b/maven-core/src/main/java/org/apache/maven/project/MavenProject.java
@@ -1133,9 +1133,9 @@ public class MavenProject
         StringBuilder sb = new StringBuilder( 128 );
         sb.append( "MavenProject: " );
         sb.append( getGroupId() );
-        sb.append( ":" );
+        sb.append( ':' );
         sb.append( getArtifactId() );
-        sb.append( ":" );
+        sb.append( ':' );
         sb.append( getVersion() );
         sb.append( " @ " );
 

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-core/src/main/java/org/apache/maven/repository/ArtifactTransferEvent.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/repository/ArtifactTransferEvent.java b/maven-core/src/main/java/org/apache/maven/repository/ArtifactTransferEvent.java
index 09729dd..0d31eb2 100644
--- a/maven-core/src/main/java/org/apache/maven/repository/ArtifactTransferEvent.java
+++ b/maven-core/src/main/java/org/apache/maven/repository/ArtifactTransferEvent.java
@@ -242,7 +242,7 @@ public class ArtifactTransferEvent
 
     public String toString()
     {
-        StringBuilder sb = new StringBuilder();
+        StringBuilder sb = new StringBuilder( 64 );
 
         sb.append( "TransferEvent[" );
 
@@ -259,7 +259,7 @@ public class ArtifactTransferEvent
                 break;
         }
 
-        sb.append( "|" );
+        sb.append( '|' );
         switch ( this.getEventType() )
         {
             case TRANSFER_COMPLETED:
@@ -282,9 +282,9 @@ public class ArtifactTransferEvent
                 break;
         }
 
-        sb.append( "|" );
-        sb.append( this.getLocalFile() ).append( "|" );
-        sb.append( "]" );
+        sb.append( '|' );
+        sb.append( this.getLocalFile() ).append( '|' );
+        sb.append( ']' );
 
         return sb.toString();
     }

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/AbstractArtifactMetadata.java
----------------------------------------------------------------------
diff --git a/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/AbstractArtifactMetadata.java b/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/AbstractArtifactMetadata.java
index 352e5bb..def20e4 100644
--- a/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/AbstractArtifactMetadata.java
+++ b/maven-core/src/main/java/org/apache/maven/repository/legacy/metadata/AbstractArtifactMetadata.java
@@ -53,7 +53,7 @@ public abstract class AbstractArtifactMetadata
 
     public String extendedToString()
     {
-        StringBuilder buffer = new StringBuilder();
+        StringBuilder buffer = new StringBuilder( 256 );
 
         buffer.append( "\nArtifact Metadata\n--------------------------" );
         buffer.append( "\nGroupId: " ).append( getGroupId() );

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java
----------------------------------------------------------------------
diff --git a/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java b/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java
index 52fdd80..c919cdf 100644
--- a/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java
+++ b/maven-core/src/test/java/org/apache/maven/project/LegacyLocalRepositoryManager.java
@@ -59,7 +59,7 @@ public class LegacyLocalRepositoryManager
 
         path.append( artifact.getGroupId() ).append( '/' );
 
-        path.append( artifact.getExtension() ).append( 's' ).append( '/' );
+        path.append( artifact.getExtension() ).append( "s/" );
 
         path.append( artifact.getArtifactId() ).append( '-' ).append( artifact.getVersion() );
 

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
index f164852..c5faef5 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/CLIReportingUtils.java
@@ -71,7 +71,7 @@ public final class CLIReportingUtils
         version.append( "Default locale: " ).append( Locale.getDefault() ).append( ", platform encoding: " ).append(
             System.getProperty( "file.encoding", "<unknown encoding>" ) ).append( ls );
         version.append( "OS name: \"" ).append( Os.OS_NAME ).append( "\", version: \"" ).append( Os.OS_VERSION ).append(
-            "\", arch: \"" ).append( Os.OS_ARCH ).append( "\", family: \"" ).append( Os.OS_FAMILY ).append( "\"" );
+            "\", arch: \"" ).append( Os.OS_ARCH ).append( "\", family: \"" ).append( Os.OS_FAMILY ).append( '\"' );
         return version.toString();
     }
 

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
index d239884..1cdbd23 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/MavenCli.java
@@ -1621,7 +1621,7 @@ public class MavenCli
 
         String value;
 
-        int i = property.indexOf( "=" );
+        int i = property.indexOf( '=' );
 
         if ( i <= 0 )
         {

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
index 25ec38d..76327ea 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/event/ExecutionEventLogger.java
@@ -174,7 +174,7 @@ public class ExecutionEventLogger
                     buffer.append( chars( ' ', padSize ) );
                 }
                 buffer.append( buildTimeDuration );
-                buffer.append( "]" );
+                buffer.append( ']' );
             }
             else if ( buildSummary instanceof BuildFailure )
             {
@@ -187,7 +187,7 @@ public class ExecutionEventLogger
                     buffer.append( chars( ' ', padSize ) );
                 }
                 buffer.append( buildTimeDuration );
-                buffer.append( "]" );
+                buffer.append( ']' );
             }
 
             logger.info( buffer.toString() );

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/UnsupportedSlf4jBindingConfiguration.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/UnsupportedSlf4jBindingConfiguration.java b/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/UnsupportedSlf4jBindingConfiguration.java
index 2e91b25..d269770 100644
--- a/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/UnsupportedSlf4jBindingConfiguration.java
+++ b/maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/UnsupportedSlf4jBindingConfiguration.java
@@ -59,7 +59,7 @@ public class UnsupportedSlf4jBindingConfiguration
         for ( Map.Entry<URL, Set<Object>> entry : supported.entrySet() )
         {
             StringBuilder sb = new StringBuilder();
-            sb.append( "(from " ).append( entry.getKey().toExternalForm() ).append( ")" );
+            sb.append( "(from " ).append( entry.getKey().toExternalForm() ).append( ')' );
 
             for ( Object binding : entry.getValue() )
             {

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java
----------------------------------------------------------------------
diff --git a/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java b/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java
index a06f0a1..f58d75b 100644
--- a/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java
+++ b/maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java
@@ -62,7 +62,7 @@ public class CLIManagerDocumentationTest
 
     public String getOptionsAsHtml()
     {
-        StringBuilder sb = new StringBuilder();
+        StringBuilder sb = new StringBuilder( 512 );
         boolean a = true;
         sb.append( "<table border='1' class='zebra-striped'><tr class='a'><th><b>Options</b></th><th><b>Description</b></th></tr>" );
         for ( Option option : new CLIManagerExtension().getOptions() )

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
index ac54737..189651b 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelBuilder.java
@@ -914,8 +914,8 @@ public class DefaultModelBuilder
             {
                 buffer.append( " of POM " ).append( ModelProblemUtils.toSourceHint( childModel ) );
             }
-            buffer.append( " points at " ).append( groupId ).append( ":" ).append( artifactId );
-            buffer.append( " instead of " ).append( parent.getGroupId() ).append( ":" );
+            buffer.append( " points at " ).append( groupId ).append( ':' ).append( artifactId );
+            buffer.append( " instead of " ).append( parent.getGroupId() ).append( ':' );
             buffer.append( parent.getArtifactId() ).append( ", please verify your project structure" );
 
             problems.setSource( childModel );
@@ -1028,7 +1028,7 @@ public class DefaultModelBuilder
             buffer.append( "Non-resolvable parent POM" );
             if ( !containsCoordinates( e.getMessage(), groupId, artifactId, version ) )
             {
-                buffer.append( " " ).append( ModelProblemUtils.toId( groupId, artifactId, version ) );
+                buffer.append( ' ' ).append( ModelProblemUtils.toId( groupId, artifactId, version ) );
             }
             if ( childModel != problems.getRootModel() )
             {
@@ -1221,7 +1221,7 @@ public class DefaultModelBuilder
                         buffer.append( "Non-resolvable import POM" );
                         if ( !containsCoordinates( e.getMessage(), groupId, artifactId, version ) )
                         {
-                            buffer.append( " " ).append( ModelProblemUtils.toId( groupId, artifactId, version ) );
+                            buffer.append( ' ' ).append( ModelProblemUtils.toId( groupId, artifactId, version ) );
                         }
                         buffer.append( ": " ).append( e.getMessage() );
 

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java
index 0892f0a..78e81e3 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/DefaultModelProblem.java
@@ -165,7 +165,7 @@ public class DefaultModelProblem
     {
         StringBuilder buffer = new StringBuilder( 128 );
 
-        buffer.append( "[" ).append( getSeverity() ).append( "] " );
+        buffer.append( '[' ).append( getSeverity() ).append( "] " );
         buffer.append( getMessage() );
         buffer.append( " @ " ).append( ModelProblemUtils.formatLocation( this, null ) );
 

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java
----------------------------------------------------------------------
diff --git a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java
index 806c28d..76c23e1 100644
--- a/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java
+++ b/maven-model-builder/src/main/java/org/apache/maven/model/building/ModelProblemUtils.java
@@ -51,7 +51,7 @@ public class ModelProblemUtils
         File pomFile = model.getPomFile();
         if ( pomFile != null )
         {
-            buffer.append( " (" ).append( pomFile ).append( ")" );
+            buffer.append( " (" ).append( pomFile ).append( ')' );
         }
 
         return buffer.toString();

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java
----------------------------------------------------------------------
diff --git a/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java b/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java
index 4d99546..cdb9a23 100644
--- a/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java
+++ b/maven-plugin-api/src/main/java/org/apache/maven/plugin/MojoNotFoundException.java
@@ -54,7 +54,7 @@ public class MojoNotFoundException
     {
         StringBuilder buffer = new StringBuilder( 256 );
 
-        buffer.append( "Could not find goal '" ).append( goal ).append( "'" );
+        buffer.append( "Could not find goal '" ).append( goal ).append( '\'' );
 
         if ( pluginDescriptor != null )
         {

http://git-wip-us.apache.org/repos/asf/maven/blob/8d91726f/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsProblem.java
----------------------------------------------------------------------
diff --git a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsProblem.java b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsProblem.java
index b261fa1..a8eb909 100644
--- a/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsProblem.java
+++ b/maven-settings-builder/src/main/java/org/apache/maven/settings/building/DefaultSettingsProblem.java
@@ -156,7 +156,7 @@ public class DefaultSettingsProblem
     {
         StringBuilder buffer = new StringBuilder( 128 );
 
-        buffer.append( "[" ).append( getSeverity() ).append( "] " );
+        buffer.append( '[' ).append( getSeverity() ).append( "] " );
         buffer.append( getMessage() );
         buffer.append( " @ " ).append( getLocation() );
 


Mime
View raw message