Author: brett
Date: Sun Apr 30 17:31:21 2006
New Revision: 398475

URL: http://svn.apache.org/viewcvs?rev=398475&view=rev
Log:
we don't need to duplicate the split method

Removed:
    
maven/surefire/branches/surefire-testng/surefire-booter/src/test/java/org/apache/maven/surefire/booter/SurefireBooterTest.java
Modified:
    
maven/surefire/branches/surefire-testng/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java

Modified: 
maven/surefire/branches/surefire-testng/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java
URL: 
http://svn.apache.org/viewcvs/maven/surefire/branches/surefire-testng/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java?rev=398475&r1=398474&r2=398475&view=diff
==============================================================================
--- 
maven/surefire/branches/surefire-testng/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java
 (original)
+++ 
maven/surefire/branches/surefire-testng/surefire-booter/src/main/java/org/apache/maven/surefire/booter/SurefireBooter.java
 Sun Apr 30 17:31:21 2006
@@ -19,6 +19,7 @@
 import org.apache.maven.surefire.Surefire;
 import org.apache.maven.surefire.testset.TestSetFailedException;
 import org.codehaus.plexus.util.IOUtil;
+import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.cli.CommandLineException;
 import org.codehaus.plexus.util.cli.CommandLineUtils;
 import org.codehaus.plexus.util.cli.StreamConsumer;
@@ -709,29 +710,7 @@
      */
     public static String[] split( String s, String delimiter )
     {
-        String delim = delimiter;
-        if ( "\\|".equals( delimiter ) )
-        {
-            delim = "|";
-        }
-        if ( s.equals( delim ) )
-        {
-            return new String[0];
-        }
-        List tokens = new ArrayList();
-        int i = 0;
-        int j = s.indexOf( delim, i );
-        while ( j > -1 )
-        {
-            tokens.add( s.substring( i, j ) );
-            i = j + delim.length();
-            j = s.indexOf( delim, i );
-        }
-        if ( i < s.length() || ( i == 0 ) )
-        {
-            tokens.add( s.substring( i ) );
-        }
-        return (String[]) tokens.toArray( new String[0] );
+        return StringUtils.split( s, delimiter );
     }
 }
 


Reply via email to