[jboss-cvs] JBossAS SVN: r83998 - projects/vfs/trunk/src/main/java/org/jboss/virtual.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Feb 9 08:51:02 EST 2009


Author: alesj
Date: 2009-02-09 08:51:02 -0500 (Mon, 09 Feb 2009)
New Revision: 83998

Modified:
   projects/vfs/trunk/src/main/java/org/jboss/virtual/VFS.java
Log:
try/catch segments.

Modified: projects/vfs/trunk/src/main/java/org/jboss/virtual/VFS.java
===================================================================
--- projects/vfs/trunk/src/main/java/org/jboss/virtual/VFS.java	2009-02-09 13:12:10 UTC (rev 83997)
+++ projects/vfs/trunk/src/main/java/org/jboss/virtual/VFS.java	2009-02-09 13:51:02 UTC (rev 83998)
@@ -121,12 +121,30 @@
     */
    static void cleanup(VirtualFile file)
    {
+      VirtualFileHandler fileHandler = file.getHandler();
+      VFSContext context = fileHandler.getVFSContext();
+
       try
       {
-         VirtualFileHandler fileHandler = file.getHandler();
-         VFSContext context = fileHandler.getVFSContext();
          context.cleanupTempInfo(fileHandler.getPathName());
-         
+      }
+      catch (Exception ignored)
+      {
+      }
+
+      try
+      {
+         // just to make sure the ref is removed
+         VirtualFileHandler parent = fileHandler.getParent();
+         if (parent != null)
+            parent.removeChild(fileHandler.getName());
+      }
+      catch (Exception ignored)
+      {
+      }
+
+      try
+      {
          VirtualFileHandler contextHandler = context.getRoot();
          // the file is the context root, hence possible registry candidate
          if (fileHandler.equals(contextHandler))




More information about the jboss-cvs-commits mailing list