mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
83971: ALF-21100 - defensive code improvement around handing of invalid Search operator option. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@84607 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -670,10 +670,17 @@ public class Search extends BaseScopableProcessorExtension implements Initializi
|
|||||||
{
|
{
|
||||||
sp.setDefaultFieldName(defaultField);
|
sp.setDefaultFieldName(defaultField);
|
||||||
}
|
}
|
||||||
if (defaultOperator != null)
|
if (defaultOperator != null && defaultOperator.length() != 0)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
sp.setDefaultOperator(Operator.valueOf(defaultOperator.toUpperCase()));
|
sp.setDefaultOperator(Operator.valueOf(defaultOperator.toUpperCase()));
|
||||||
}
|
}
|
||||||
|
catch (IllegalArgumentException e)
|
||||||
|
{
|
||||||
|
// ignore invalid Operator and the default value will be used
|
||||||
|
}
|
||||||
|
}
|
||||||
if (namespace != null)
|
if (namespace != null)
|
||||||
{
|
{
|
||||||
sp.setNamespace(namespace);
|
sp.setNamespace(namespace);
|
||||||
|
Reference in New Issue
Block a user