From 4a6e3a5413c776f7cf918aaa3e063b8d1ef45fd4 Mon Sep 17 00:00:00 2001 From: Kevin Roast Date: Mon, 8 Oct 2012 14:44:09 +0000 Subject: [PATCH] Merged BRANCHES/DEV/V4.1-BUG-FIX to HEAD 42431: Fix to initialisation code that can cause patches such as ActivitiesTemplatesUpdatePatch that access beans such as Repository before the spring bean init lifecycle has completed to fail. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@42435 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../java/org/alfresco/repo/model/Repository.java | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/source/java/org/alfresco/repo/model/Repository.java b/source/java/org/alfresco/repo/model/Repository.java index 16a9232b24..616b185b06 100644 --- a/source/java/org/alfresco/repo/model/Repository.java +++ b/source/java/org/alfresco/repo/model/Repository.java @@ -76,9 +76,8 @@ public class Repository implements ApplicationContextAware, ApplicationListener, // company home private StoreRef companyHomeStore; private String companyHomePath; - private Map companyHomeRefs; - - private Map rootRefs; + final private Map companyHomeRefs = new ConcurrentHashMap(); + final private Map rootRefs = new ConcurrentHashMap(); /** @@ -199,20 +198,9 @@ public class Repository implements ApplicationContextAware, ApplicationListener, { tenantAdminService.register(this); - if (companyHomeRefs == null) - { - companyHomeRefs = new ConcurrentHashMap(4); - } - - if (rootRefs == null) - { - rootRefs = new ConcurrentHashMap(4); - } - getCompanyHome(); } - /** * Gets the root home of the company home store *