Author: imario
Date: Wed Mar 15 11:22:44 2006
New Revision: 386144

URL: http://svn.apache.org/viewcvs?rev=386144&view=rev
Log:
PR: 38122

return null on FileObject.getChildren() if there is a problem to determine if 
there are children or not (like java.io.File)

In contrast to an empty collection this wouldnt suggest there are no children, 
just that this cant be determined.

Thanks to Huber Anton for pointing it out.

Modified:
    
jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java

Modified: 
jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java?rev=386144&r1=386143&r2=386144&view=diff
==============================================================================
--- 
jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java
 (original)
+++ 
jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java
 Wed Mar 15 11:22:44 2006
@@ -553,7 +553,11 @@
                 throw new 
FileSystemException("vfs.provider/list-children.error", new Object[]{name}, 
exc);
             }
 
-            if (files == null || files.length == 0)
+            if (files == null)
+            {
+               return null;
+            }
+            else if (files.length == 0)
             {
                 // No children
                 children = EMPTY_FILE_ARRAY;



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to