[jboss-cvs] JBossAS SVN: r69275 - projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/file.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jan 24 06:22:48 EST 2008


Author: alesj
Date: 2008-01-24 06:22:48 -0500 (Thu, 24 Jan 2008)
New Revision: 69275

Modified:
   projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/file/FileHandler.java
   projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/file/FileSystemContext.java
Log:
Fix FileNotFound with returning null.

Modified: projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/file/FileHandler.java
===================================================================
--- projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/file/FileHandler.java	2008-01-24 11:19:18 UTC (rev 69274)
+++ projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/file/FileHandler.java	2008-01-24 11:22:48 UTC (rev 69275)
@@ -194,7 +194,6 @@
 
    public VirtualFileHandler createChildHandler(String name) throws IOException
    {
-      FileSystemContext context = getVFSContext();
       File parentFile = getFile();
       File child = new File(parentFile, name);
       VirtualFileHandler handler = childCache.get(name);
@@ -206,6 +205,7 @@
       }
       if (handler == null)
       {
+         FileSystemContext context = getVFSContext();
          handler = context.createVirtualFileHandler(this, child);
          childCache.put(name, handler);
       }

Modified: projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/file/FileSystemContext.java
===================================================================
--- projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/file/FileSystemContext.java	2008-01-24 11:19:18 UTC (rev 69274)
+++ projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/file/FileSystemContext.java	2008-01-24 11:22:48 UTC (rev 69275)
@@ -254,7 +254,7 @@
          if( handler == null )
             throw new FileNotFoundException("File does not exist: " + file.getCanonicalPath());
       }
-      else
+      else if (file.exists())
       {
          handler = new FileHandler(this, parent, file, uri);
       }




More information about the jboss-cvs-commits mailing list