You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by im...@apache.org on 2006/03/15 20:22:45 UTC
svn commit: r386144 -
/jakarta/commons/proper/vfs/trunk/src/java/org/apache/commons/vfs/provider/AbstractFileObject.java
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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org