[jboss-cvs] JBossAS SVN: r94989 - projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/jar.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Oct 15 17:55:47 EDT 2009


Author: david.lloyd at jboss.com
Date: 2009-10-15 17:55:47 -0400 (Thu, 15 Oct 2009)
New Revision: 94989

Modified:
   projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/jar/JARStructure.java
Log:
Suffixes should be per instance

Modified: projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/jar/JARStructure.java
===================================================================
--- projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/jar/JARStructure.java	2009-10-15 21:44:44 UTC (rev 94988)
+++ projects/jboss-deployers/branches/vfs3/deployers-vfs/src/main/java/org/jboss/deployers/vfs/plugins/structure/jar/JARStructure.java	2009-10-15 21:55:47 UTC (rev 94989)
@@ -43,7 +43,7 @@
  */
 public class JARStructure extends AbstractVFSStructureDeployer
 {
-   private static final Set<String> JAR_SUFFIXES = Collections.synchronizedSet(new HashSet<String>());
+   private final Set<String> suffixes = Collections.synchronizedSet(new HashSet<String>());
 
    /**
     * Create a new JARStructure. with the default suffixes
@@ -72,7 +72,7 @@
     */
    public Set<String> getSuffixes()
    {
-      return JAR_SUFFIXES;
+      return suffixes;
    }
    /**
     * Gets the set of suffixes recognised as jars
@@ -81,8 +81,8 @@
     */
    public void setSuffixes(Set<String> suffixes)
    {
-      JAR_SUFFIXES.retainAll(suffixes);
-      JAR_SUFFIXES.addAll(suffixes);
+      this.suffixes.retainAll(suffixes);
+      this.suffixes.addAll(suffixes);
    }
 
    @Install
@@ -90,7 +90,7 @@
    {
       String extension = provider.getJarExtension();
       if (extension != null)
-         JAR_SUFFIXES.add(extension);
+         suffixes.add(extension);
    }
 
    @Uninstall
@@ -98,7 +98,7 @@
    {
       String extension = provider.getJarExtension();
       if (extension != null)
-         JAR_SUFFIXES.remove(extension);
+         suffixes.remove(extension);
    }
 
    private static boolean isArchive(String name) {
@@ -108,7 +108,7 @@
          if (i == -1) {
             return false;
          }
-         if (JAR_SUFFIXES.contains(name.substring(i))) {
+         if (suffixes.contains(name.substring(i))) {
             return true;
          }
       }




More information about the jboss-cvs-commits mailing list