aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames William Dumay <jdumay@apache.org>2008-12-17 00:10:13 +0000
committerJames William Dumay <jdumay@apache.org>2008-12-17 00:10:13 +0000
commitc2c0d59613a03a290ffcf3d85bfd5ddff95714bd (patch)
tree402648c5737e6b3c9acb39e0aa56ae027b497fef
parent5786c1db339c5ef0edac0b75d60ad0ba109a4c56 (diff)
downloadarchiva-c2c0d59613a03a290ffcf3d85bfd5ddff95714bd.tar.gz
archiva-c2c0d59613a03a290ffcf3d85bfd5ddff95714bd.zip
map variables should be final if they are to be used with the synchronized keyword
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@727229 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/RepositoryContentFactory.java13
1 files changed, 8 insertions, 5 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/RepositoryContentFactory.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/RepositoryContentFactory.java
index b1c0b664b..e035b48e7 100644
--- a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/RepositoryContentFactory.java
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/RepositoryContentFactory.java
@@ -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 );
}