maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tibordig...@apache.org
Subject [3/4] maven-surefire git commit: [SUREFIRE] refactoring
Date Sat, 26 Dec 2015 01:23:38 GMT
[SUREFIRE] refactoring


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

Branch: refs/heads/master
Commit: 6e3be85d1dbbd3d0412ab44f72fdfb5ce134f5ce
Parents: b825755
Author: Tibor17 <tibor17@lycos.com>
Authored: Sun Dec 20 01:46:09 2015 +0100
Committer: Tibor17 <tibor17@lycos.com>
Committed: Sat Dec 26 02:22:49 2015 +0100

----------------------------------------------------------------------
 .../org/apache/maven/surefire/util/RunOrder.java | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/6e3be85d/surefire-api/src/main/java/org/apache/maven/surefire/util/RunOrder.java
----------------------------------------------------------------------
diff --git a/surefire-api/src/main/java/org/apache/maven/surefire/util/RunOrder.java b/surefire-api/src/main/java/org/apache/maven/surefire/util/RunOrder.java
index e262e53..4647172 100644
--- a/surefire-api/src/main/java/org/apache/maven/surefire/util/RunOrder.java
+++ b/surefire-api/src/main/java/org/apache/maven/surefire/util/RunOrder.java
@@ -83,27 +83,26 @@ public class RunOrder
                 }
             }
 
-            StringBuffer errorMessage = createMessageForMissingRunOrder( name );
-            throw new IllegalArgumentException( errorMessage.toString() );
+            String errorMessage = createMessageForMissingRunOrder( name );
+            throw new IllegalArgumentException( errorMessage );
         }
     }
 
-    private static StringBuffer createMessageForMissingRunOrder( String name )
+    private static String createMessageForMissingRunOrder( String name )
     {
         RunOrder[] runOrders = values();
-        StringBuffer message = new StringBuffer();
-        message.append( "There's no RunOrder with the name " );
-        message.append( name );
-        message.append( ". Please use one of the following RunOrders: " );
+        String message = "There's no RunOrder with the name ";
+        message += name;
+        message += ". Please use one of the following RunOrders: ";
         for ( int i = 0; i < runOrders.length; i++ )
         {
             if ( i != 0 )
             {
-                message.append( ", " );
+                message += ", ";
             }
-            message.append( runOrders[i] );
+            message += runOrders[i];
         }
-        message.append( "." );
+        message += ".";
         return message;
     }
 


Mime
View raw message