SHA-1771: Final (hopefully) bug fix on search term highlighting parameter handling

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@131682 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Draper
2016-10-22 19:05:29 +00:00
parent 2f24cb6e45
commit 2b4db66fbe

View File

@@ -859,12 +859,13 @@ public class Search extends BaseScopableProcessorExtension implements Initializi
*/ */
public int getIntegerValue(String attribute, int defaultValue, Map<Serializable, Serializable> sourceObject) public int getIntegerValue(String attribute, int defaultValue, Map<Serializable, Serializable> sourceObject)
{ {
Integer integer = (Integer) sourceObject.get(attribute); int intValue = defaultValue;
if (integer == null) Number configuredInteger = (Number) sourceObject.get(attribute);
if (configuredInteger != null)
{ {
integer = defaultValue; intValue = configuredInteger.intValue();
} }
return integer; return intValue;
} }
/** /**