mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
findSites() catches LuceneQueryParserException, logs it but supresses it from the user. ACE-1513
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@68308 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -58,6 +58,7 @@ import org.alfresco.repo.node.getchildren.GetChildrenCannedQueryFactory;
|
||||
import org.alfresco.repo.policy.BehaviourFilter;
|
||||
import org.alfresco.repo.policy.JavaBehaviour;
|
||||
import org.alfresco.repo.policy.PolicyComponent;
|
||||
import org.alfresco.repo.search.impl.lucene.LuceneQueryParserException;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationContext;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
|
||||
@@ -111,7 +112,6 @@ import org.json.JSONObject;
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
import org.springframework.extensions.surf.util.AbstractLifecycleBean;
|
||||
import org.springframework.extensions.surf.util.ParameterCheck;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Site Service Implementation. Also bootstraps the site AVM and DM stores.
|
||||
@@ -882,18 +882,25 @@ public class SiteServiceImpl extends AbstractLifecycleBean implements SiteServic
|
||||
logger.debug("Search parameters are: " + sp);
|
||||
}
|
||||
|
||||
ResultSet results = this.searchService.query(sp);
|
||||
ResultSet results = null;
|
||||
try
|
||||
{
|
||||
results = this.searchService.query(sp);
|
||||
result = new ArrayList<SiteInfo>(results.length());
|
||||
for (NodeRef site : results.getNodeRefs())
|
||||
{
|
||||
result.add(createSiteInfo(site));
|
||||
}
|
||||
}
|
||||
catch (LuceneQueryParserException lqpe)
|
||||
{
|
||||
//Log the error but suppress is from the user
|
||||
logger.error("LuceneQueryParserException with findSites()", lqpe);
|
||||
result = Collections.emptyList();
|
||||
}
|
||||
finally
|
||||
{
|
||||
results.close();
|
||||
if (results != null) results.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user