]> source.dussan.org Git - archiva.git/commitdiff
map variables should be final if they are to be used with the synchronized keyword
authorJames William Dumay <jdumay@apache.org>
Wed, 17 Dec 2008 00:10:13 +0000 (00:10 +0000)
committerJames William Dumay <jdumay@apache.org>
Wed, 17 Dec 2008 00:10:13 +0000 (00:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@727229 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/RepositoryContentFactory.java

index b1c0b664b84ea760fe33dece57fdf6a557f992a1..e035b48e7af4233763dbd40ede4a5fd886619003 100644 (file)
@@ -53,12 +53,18 @@ public class RepositoryContentFactory
      */
     private ArchivaConfiguration archivaConfiguration;
 
-    private Map<String, ManagedRepositoryContent> managedContentMap;
+    private final Map<String, ManagedRepositoryContent> managedContentMap;
 
-    private Map<String, RemoteRepositoryContent> remoteContentMap;
+    private final Map<String, RemoteRepositoryContent> remoteContentMap;
 
     private PlexusContainer container;
 
+    public RepositoryContentFactory()
+    {
+        managedContentMap = new HashMap<String, ManagedRepositoryContent>();
+        remoteContentMap = new HashMap<String, RemoteRepositoryContent>();
+    }
+
     /**
      * Get the ManagedRepositoryContent object for the repository Id specified.
      * 
@@ -154,9 +160,6 @@ public class RepositoryContentFactory
     public void initialize()
         throws InitializationException
     {
-        managedContentMap = new HashMap<String, ManagedRepositoryContent>();
-        remoteContentMap = new HashMap<String, RemoteRepositoryContent>();
-
         archivaConfiguration.addChangeListener( this );
     }