You are viewing a plain text version of this content. The canonical link for it is here.
Posted to surefire-commits@maven.apache.org by ca...@apache.org on 2006/03/22 09:15:02 UTC

svn commit: r387790 - /maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/SurefireBooter.java

Author: carlos
Date: Wed Mar 22 00:14:59 2006
New Revision: 387790

URL: http://svn.apache.org/viewcvs?rev=387790&view=rev
Log:
Improve error handling

Modified:
    maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/SurefireBooter.java

Modified: maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/SurefireBooter.java
URL: http://svn.apache.org/viewcvs/maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/SurefireBooter.java?rev=387790&r1=387789&r2=387790&view=diff
==============================================================================
--- maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/SurefireBooter.java (original)
+++ maven/surefire/trunk/surefire-booter/src/main/java/org/apache/maven/surefire/SurefireBooter.java Wed Mar 22 00:14:59 2006
@@ -24,6 +24,7 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.OutputStreamWriter;
 import java.io.Writer;
@@ -280,7 +281,15 @@
 
         boolean childDelegation = "true".equals( p.getProperty( "childDelegation", "false" ) );
 
-        List urls = Arrays.asList( cp.split( PS ) );
+        List urls;
+        if ( cp == null )
+        {
+            urls = new ArrayList(0);
+        }
+        else
+        {
+            urls = Arrays.asList( cp.split( PS ) );
+        }
 
         return createClassLoader( urls, childDelegation );
     }
@@ -619,7 +628,7 @@
 
         if ( !f.exists() )
         {
-            return p;
+            throw new FileNotFoundException( f.getAbsolutePath() );
         }
 
         f.deleteOnExit();