[jboss-cvs] JBossAS SVN: r84311 - projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/registry.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 17 09:47:54 EST 2009
Author: alesj
Date: 2009-02-17 09:47:54 -0500 (Tue, 17 Feb 2009)
New Revision: 84311
Modified:
projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/registry/DefaultVFSRegistry.java
Log:
Ignore temps that match too much.
Modified: projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/registry/DefaultVFSRegistry.java
===================================================================
--- projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/registry/DefaultVFSRegistry.java 2009-02-17 14:36:50 UTC (rev 84310)
+++ projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/registry/DefaultVFSRegistry.java 2009-02-17 14:47:54 UTC (rev 84311)
@@ -78,13 +78,14 @@
if (relativePath.startsWith(path))
{
String subpath = relativePath.substring(path.length());
- VirtualFileHandler child = findHandler(ti.getHandler(), subpath);
- return child.getVirtualFile();
+ VirtualFileHandler child = findHandler(ti.getHandler(), subpath, true);
+ if (child != null)
+ return child.getVirtualFile();
}
}
VirtualFileHandler root = context.getRoot();
- VirtualFileHandler child = findHandler(root, relativePath);
+ VirtualFileHandler child = findHandler(root, relativePath, false);
return child.getVirtualFile();
}
return null;
@@ -96,12 +97,13 @@
* @param root the root
* @param path the path
* @return child handler
+ * @param allowNotFound do we allow not found
* @throws IOException for any error
*/
- protected VirtualFileHandler findHandler(VirtualFileHandler root, String path) throws IOException
+ protected VirtualFileHandler findHandler(VirtualFileHandler root, String path, boolean allowNotFound) throws IOException
{
VirtualFileHandler child = root.getChild(path);
- if (child == null)
+ if (child == null && allowNotFound == false)
{
List<VirtualFileHandler> children = root.getChildren(true);
throw new IOException("Child not found " + path + " for " + root + ", available children: " + children);
More information about the jboss-cvs-commits
mailing list