maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfscho...@apache.org
Subject svn commit: r1491297 - in /maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer: AlwaysFail.java AlwaysPass.java RequireReleaseVersion.java
Date Sun, 09 Jun 2013 21:11:22 GMT
Author: rfscholte
Date: Sun Jun  9 21:11:21 2013
New Revision: 1491297

URL: http://svn.apache.org/r1491297
Log:
Avoid inefficient String Buffering

Modified:
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AlwaysFail.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AlwaysPass.java
    maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseVersion.java

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AlwaysFail.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AlwaysFail.java?rev=1491297&r1=1491296&r2=1491297&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AlwaysFail.java
(original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AlwaysFail.java
Sun Jun  9 21:11:21 2013
@@ -40,7 +40,7 @@ public class AlwaysFail
         StringBuffer buf = new StringBuffer();
         if ( message != null )
         {
-            buf.append( message + "\n" );
+            buf.append( message ).append( '\n' );
         }
         buf.append( "Always fails!" );
         throw new EnforcerRuleException( buf.toString() );

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AlwaysPass.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AlwaysPass.java?rev=1491297&r1=1491296&r2=1491297&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AlwaysPass.java
(original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/AlwaysPass.java
Sun Jun  9 21:11:21 2013
@@ -41,7 +41,7 @@ public class AlwaysPass
         StringBuffer buf = new StringBuffer();
         if ( message != null )
         {
-            buf.append( message + "\n" );
+            buf.append( message ).append( '\n' );
         }
         buf.append( "Always pass!" );
         log.info( buf.toString() );

Modified: maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseVersion.java
URL: http://svn.apache.org/viewvc/maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseVersion.java?rev=1491297&r1=1491296&r2=1491297&view=diff
==============================================================================
--- maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseVersion.java
(original)
+++ maven/enforcer/trunk/enforcer-rules/src/main/java/org/apache/maven/plugins/enforcer/RequireReleaseVersion.java
Sun Jun  9 21:11:21 2013
@@ -57,9 +57,9 @@ public class RequireReleaseVersion
             StringBuffer buf = new StringBuffer();
             if ( message != null )
             {
-                buf.append( message + "\n" );
+                buf.append( message ).append( '\n' );
             }
-            buf.append( "This project cannot be a snapshot:" + project.getArtifact().getId()
);
+            buf.append( "This project cannot be a snapshot:").append( project.getArtifact().getId()
);
             throw new EnforcerRuleException( buf.toString() );
         }
         if ( failWhenParentIsSnapshot )



Mime
View raw message