From c2c0d59613a03a290ffcf3d85bfd5ddff95714bd Mon Sep 17 00:00:00 2001 From: James William Dumay Date: Wed, 17 Dec 2008 00:10:13 +0000 Subject: [PATCH] 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 --- .../repository/RepositoryContentFactory.java | 13 ++++++++----- 1 file 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 managedContentMap; + private final Map managedContentMap; - private Map remoteContentMap; + private final Map remoteContentMap; private PlexusContainer container; + public RepositoryContentFactory() + { + managedContentMap = new HashMap(); + remoteContentMap = new HashMap(); + } + /** * Get the ManagedRepositoryContent object for the repository Id specified. * @@ -154,9 +160,6 @@ public class RepositoryContentFactory public void initialize() throws InitializationException { - managedContentMap = new HashMap(); - remoteContentMap = new HashMap(); - archivaConfiguration.addChangeListener( this ); } -- 2.39.5