You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2015/03/26 23:27:05 UTC

maven-surefire git commit: [SUREFIRE] build fix on Ubuntu & Maven 221

Repository: maven-surefire
Updated Branches:
  refs/heads/master 2824f9408 -> a345f485c


[SUREFIRE] build fix on Ubuntu & Maven 221


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

Branch: refs/heads/master
Commit: a345f485c7768b69d07a48e64c9c53f59d13405e
Parents: 2824f94
Author: Tibor17 <ti...@lycos.com>
Authored: Thu Mar 26 23:26:44 2015 +0100
Committer: Tibor17 <ti...@lycos.com>
Committed: Thu Mar 26 23:26:44 2015 +0100

----------------------------------------------------------------------
 .../surefire/its/AbstractTestMultipleMethodPatterns.java  | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/a345f485/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestMultipleMethodPatterns.java
----------------------------------------------------------------------
diff --git a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestMultipleMethodPatterns.java b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestMultipleMethodPatterns.java
index cf91ef9..9c7b4b4 100644
--- a/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestMultipleMethodPatterns.java
+++ b/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/AbstractTestMultipleMethodPatterns.java
@@ -61,7 +61,7 @@ public abstract class AbstractTestMultipleMethodPatterns
         return launcher;
     }
 
-    private String[] splitIncludesExcludes( String patterns )
+    private static String[] splitIncludesExcludes( String patterns )
     {
         String included = "";
         String excluded = "";
@@ -79,7 +79,13 @@ public abstract class AbstractTestMultipleMethodPatterns
                 included += ", ";
             }
         }
-        return new String[]{ included, excluded.endsWith( ", " ) ? excluded.substring( 0, excluded.length() - 2 ) : excluded };
+        return new String[]{ trimEndComma( included ), trimEndComma( excluded ) };
+    }
+
+    private static String trimEndComma( String pattern )
+    {
+        pattern = pattern.trim();
+        return pattern.endsWith( "," ) ? pattern.substring( 0, pattern.length() - 1 ) : pattern;
     }
 
     @Test