mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
ACS-2800: Replace throwing NPE to CmisInvalidArgumentException (#1130)
* ACS-2800 Throw CmisInvalidArgumentException if type cannot be found * ACS-2800 Reformat code
This commit is contained in:
@@ -78,6 +78,10 @@ public class ObjectTypeIdLuceneBuilder extends BaseLuceneBuilder
|
|||||||
String field = getLuceneFieldName();
|
String field = getLuceneFieldName();
|
||||||
String stringValue = getValueAsString(value);
|
String stringValue = getValueAsString(value);
|
||||||
TypeDefinitionWrapper type = cmisDictionaryService.findType(stringValue);
|
TypeDefinitionWrapper type = cmisDictionaryService.findType(stringValue);
|
||||||
|
if (type == null)
|
||||||
|
{
|
||||||
|
throw new CmisInvalidArgumentException("Unknown type: " + stringValue);
|
||||||
|
}
|
||||||
return lqpa
|
return lqpa
|
||||||
.getFieldQuery(field, type.getAlfrescoClass().toString(), AnalysisMode.IDENTIFIER, luceneFunction);
|
.getFieldQuery(field, type.getAlfrescoClass().toString(), AnalysisMode.IDENTIFIER, luceneFunction);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user