From ae9e0e3b2343706427d1a66120e0ab4f34a968de Mon Sep 17 00:00:00 2001 From: Neil McErlean Date: Mon, 29 Dec 2014 21:23:13 +0000 Subject: [PATCH] This is a tentative fix for ACE-3671. It's being checked in in order to push one build through bamboo. The fix was to remove the bootstrap patch for the solrFacetsRootFolder created within Data Dictionary. We are lucky with this feature in that any time this folder is accessed, it either happens: 1. within a write transaction and so we can lazy-create the folder 2. within a read transaction where the data being returned by the SolrFacetService can be easily simulated. So we now lazily create the folder when it is first used - reusing the importer bootstrap/view data that the patch had used. AFAICT, this will create the folder (in the default tenant) during startup and also when any search admin tries to create a new SOLR filter within a non-default tenant. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@92799 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../repo/web/scripts/facet/SolrFacetConfigAdminPost.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/java/org/alfresco/repo/web/scripts/facet/SolrFacetConfigAdminPost.java b/source/java/org/alfresco/repo/web/scripts/facet/SolrFacetConfigAdminPost.java index 36a1cf67b2..c5283343b0 100644 --- a/source/java/org/alfresco/repo/web/scripts/facet/SolrFacetConfigAdminPost.java +++ b/source/java/org/alfresco/repo/web/scripts/facet/SolrFacetConfigAdminPost.java @@ -20,6 +20,7 @@ package org.alfresco.repo.web.scripts.facet; import java.io.IOException; +import java.util.Collections; import java.util.HashMap; import java.util.Map; import java.util.Set; @@ -65,8 +66,7 @@ public class SolrFacetConfigAdminPost extends AbstractSolrFacetConfigAdminWebScr throw new WebScriptException(Status.STATUS_BAD_REQUEST, "Could not save the facet configuration.", t); } - Map model = new HashMap(1); - return model; + return new HashMap<>(); // Needs to be mutable. } private SolrFacetProperties parseRequestForFacetProperties(WebScriptRequest req)