continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r349427 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Date Mon, 28 Nov 2005 16:50:27 GMT
Author: evenisse
Date: Mon Nov 28 08:50:23 2005
New Revision: 349427

URL: http://svn.apache.org/viewcvs?rev=349427&view=rev
Log:
[CONTINUUM-453] Fix NPE in working directory

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=349427&r1=349426&r2=349427&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Mon Nov 28 08:50:23 2005
@@ -1235,30 +1235,33 @@
 
         String[] files = workingDirectory.list();
 
-        for ( int i = 0; i < files.length; i++ )
+        if ( files != null )
         {
-            File current = new File( workingDirectory, files[i] );
+            for ( int i = 0; i < files.length; i++ )
+            {
+                File current = new File( workingDirectory, files[i] );
 
-            String currentFile = null;
+                String currentFile = null;
 
-            if ( currentSubDirectory == null )
-            {
-                currentFile = files[i];
-            }
-            else
-            {
-                currentFile = currentSubDirectory + "/" + files[i];
-            }
+                if ( currentSubDirectory == null )
+                {
+                    currentFile = files[i];
+                }
+                else
+                {
+                    currentFile = currentSubDirectory + "/" + files[i];
+                }
 
-            if ( userDirectory != null && current.isDirectory() && userDirectory.startsWith(
currentFile ) )
-            {
-                dirs.add( current );
+                if ( userDirectory != null && current.isDirectory() && userDirectory.startsWith(
currentFile ) )
+                {
+                    dirs.add( current );
 
-                dirs.add( getFiles( baseDirectory, currentFile, userDirectory ) );
-            }
-            else
-            {
-                dirs.add( current );
+                    dirs.add( getFiles( baseDirectory, currentFile, userDirectory ) );
+                }
+                else
+                {
+                    dirs.add( current );
+                }
             }
         }
 



Mime
View raw message