[jboss-cvs] JBossAS SVN: r94993 - in projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure: modified and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Oct 15 20:52:39 EDT 2009


Author: david.lloyd at jboss.com
Date: 2009-10-15 20:52:39 -0400 (Thu, 15 Oct 2009)
New Revision: 94993

Modified:
   projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/AbstractCandidateStructureVisitor.java
   projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/AbstractStructureDeployer.java
   projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/SecurityActions.java
   projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractStructureModificationChecker.java
   projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractSynchAdapter.java
   projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/DefaultStructureCache.java
Log:
Various make-it-compile files

Modified: projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/AbstractCandidateStructureVisitor.java
===================================================================
--- projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/AbstractCandidateStructureVisitor.java	2009-10-16 00:15:30 UTC (rev 94992)
+++ projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/AbstractCandidateStructureVisitor.java	2009-10-16 00:52:39 UTC (rev 94993)
@@ -21,8 +21,6 @@
 */
 package org.jboss.deployers.vfs.spi.structure.helpers;
 
-import java.io.IOException;
-
 import org.jboss.deployers.spi.structure.ContextInfo;
 import org.jboss.deployers.spi.structure.StructureMetaData;
 import org.jboss.deployers.vfs.spi.structure.StructureContext;
@@ -136,17 +134,8 @@
       if (contextInfo == null)
       {
          // Ignore directories when asked
-         try
-         {
-            if (ignoreDirectories && SecurityActions.isLeaf(file) == false)
-               return;
-         }
-         catch (IOException e)
-         {
-            log.debug("Ignoring " + file + " reason=" + e);
+         if (ignoreDirectories && file.isDirectory())
             return;
-         }
-         
          // Apply any filter
          if (filter != null && filter.accepts(file) == false)
             return;

Modified: projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/AbstractStructureDeployer.java
===================================================================
--- projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/AbstractStructureDeployer.java	2009-10-16 00:15:30 UTC (rev 94992)
+++ projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/AbstractStructureDeployer.java	2009-10-16 00:52:39 UTC (rev 94993)
@@ -374,7 +374,7 @@
     * @return true when it is a leaf
     * @throws IOException for any error
     */
-   protected static boolean isLeaf(VirtualFile file) throws IOException
+   protected static boolean isLeaf(VirtualFile file)
    {
       return SecurityActions.isLeaf(file);
    }

Modified: projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/SecurityActions.java
===================================================================
--- projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/SecurityActions.java	2009-10-16 00:15:30 UTC (rev 94992)
+++ projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/helpers/SecurityActions.java	2009-10-16 00:52:39 UTC (rev 94993)
@@ -33,6 +33,10 @@
  */
 public class SecurityActions
 {
+   private SecurityActions()
+   {
+   }
+
    /**
     * Actions for File access 
     */
@@ -40,7 +44,7 @@
    { 
       FileActions PRIVILEGED = new FileActions() 
       { 
-         public boolean isLeaf(final VirtualFile f) throws IOException
+         public boolean isLeaf(final VirtualFile f)
          {
             return AccessController.doPrivileged(new PrivilegedAction<Boolean>()
             {
@@ -54,17 +58,17 @@
 
       FileActions NON_PRIVILEGED = new FileActions() 
       {
-         public boolean isLeaf(VirtualFile f) throws IOException
+         public boolean isLeaf(VirtualFile f)
          {
             return f.isLeaf();
          }
          
       };
 
-      boolean isLeaf(VirtualFile f) throws IOException;
+      boolean isLeaf(VirtualFile f);
    } 
 
-   static boolean isLeaf(VirtualFile f) throws IOException
+   static boolean isLeaf(VirtualFile f)
    {
       SecurityManager sm = System.getSecurityManager();
       if( sm != null )

Modified: projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractStructureModificationChecker.java
===================================================================
--- projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractStructureModificationChecker.java	2009-10-16 00:15:30 UTC (rev 94992)
+++ projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractStructureModificationChecker.java	2009-10-16 00:52:39 UTC (rev 94993)
@@ -249,8 +249,7 @@
     */
    protected boolean hasRootBeenModified(VirtualFile root) throws IOException
    {
-      // for back compatibility
-      return root.hasBeenModified();
+      throw new UnsupportedOperationException("Scheduled for removal");
    }
 
    /**

Modified: projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractSynchAdapter.java
===================================================================
--- projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractSynchAdapter.java	2009-10-16 00:15:30 UTC (rev 94992)
+++ projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/AbstractSynchAdapter.java	2009-10-16 00:52:39 UTC (rev 94993)
@@ -45,7 +45,7 @@
    {
       try
       {
-         URL realURL = VFSUtils.getRealURL(tempRoot);
+         URL realURL = VFSUtils.getPhysicalURL(tempRoot);
          File rootDir = new File(realURL.toURI());
          File newFile = new File(rootDir, pathToFile);
          return copy(fileToAdd, newFile);

Modified: projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/DefaultStructureCache.java
===================================================================
--- projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/DefaultStructureCache.java	2009-10-16 00:15:30 UTC (rev 94992)
+++ projects/jboss-deployers/branches/vfs3/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/DefaultStructureCache.java	2009-10-16 00:52:39 UTC (rev 94993)
@@ -58,29 +58,22 @@
 
    public List<VirtualFile> getLeaves(VirtualFile file, VirtualFileFilter filter)
    {
-      try
+      List<VirtualFile> result = null;
+      for (VirtualFile key : map.keySet())
       {
-         List<VirtualFile> result = null;
-         for (VirtualFile key : map.keySet())
+         VirtualFile parent = key.getParent();
+         if (parent != null && parent.equals(file) && (filter == null || filter.accepts(key)))
          {
-            VirtualFile parent = key.getParent();
-            if (parent != null && parent.equals(file) && (filter == null || filter.accepts(key)))
-            {
-               if (result == null)
-                  result = new ArrayList<VirtualFile>();
+            if (result == null)
+               result = new ArrayList<VirtualFile>();
 
-               result.add(key);
-            }
+            result.add(key);
          }
-         if (result != null)
-            return result;
-         else
-            return (map.containsKey(file) ? Collections.<VirtualFile>emptyList() : null);
       }
-      catch (IOException e)
-      {
-         throw new RuntimeException(e);
-      }
+      if (result != null)
+         return result;
+      else
+         return (map.containsKey(file) ? Collections.<VirtualFile>emptyList() : null);
    }
 
    public void invalidateCache(VirtualFile file)
@@ -124,21 +117,14 @@
     */
    protected boolean isAncestorOrEquals(VirtualFile ref, VirtualFile file)
    {
-      try
+      while(file != null)
       {
-         while(file != null)
-         {
-            if (file.equals(ref))
-               return true;
+         if (file.equals(ref))
+            return true;
 
-            file = file.getParent();
-         }
-         return false;
+         file = file.getParent();
       }
-      catch (IOException e)
-      {
-         throw new RuntimeException(e);
-      }
+      return false;
    }
 
    public void flush()




More information about the jboss-cvs-commits mailing list