[jboss-cvs] JBossAS SVN: r87712 - in projects/vfs/trunk/src/main/java/org/jboss/virtual: plugins/context/file and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Apr 23 03:55:27 EDT 2009


Author: alesj
Date: 2009-04-23 03:55:27 -0400 (Thu, 23 Apr 2009)
New Revision: 87712

Modified:
   projects/vfs/trunk/src/main/java/org/jboss/virtual/VFS.java
   projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/file/FileHandler.java
Log:
Remove that child remove at cleanup.

Modified: projects/vfs/trunk/src/main/java/org/jboss/virtual/VFS.java
===================================================================
--- projects/vfs/trunk/src/main/java/org/jboss/virtual/VFS.java	2009-04-23 07:28:39 UTC (rev 87711)
+++ projects/vfs/trunk/src/main/java/org/jboss/virtual/VFS.java	2009-04-23 07:55:27 UTC (rev 87712)
@@ -139,18 +139,6 @@
 
       try
       {
-         // just to make sure the ref is removed
-         VirtualFileHandler parent = fileHandler.getParent();
-         if (parent != null)
-            parent.removeChild(fileHandler.getName());
-      }
-      catch (Exception e)
-      {
-         log.debug("Exception removing child, file=" + file, e);
-      }
-
-      try
-      {
          VirtualFileHandler contextHandler = context.getRoot();
          // the file is the context root, hence possible registry candidate
          if (fileHandler.equals(contextHandler))

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	2009-04-23 07:28:39 UTC (rev 87711)
+++ projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/file/FileHandler.java	2009-04-23 07:55:27 UTC (rev 87712)
@@ -283,8 +283,9 @@
       VirtualFileHandler handler = childCache.get(name);
       // if a child has already been created use that
       // if the child has been modified on disk then create a new handler
-      if (handler != null && handler.hasBeenModified())
+      if (handler != null && (handler.hasBeenModified() || handler.exists() == false))
       {
+         childCache.remove(name);
          handler = null;
       }
       if (handler == null)




More information about the jboss-cvs-commits mailing list