Merged searchrep (5.2.1) to 5.2.N (5.2.1)

137015 gjames: SEARCH-451: Better error message for pivot key reuse


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@137087 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gethin James
2017-06-01 11:23:01 +00:00
parent b6d6a70302
commit 710af2f318

View File

@@ -655,8 +655,10 @@ public class SearchMapper
if (pivotKey == null)
{
String invalidMessage = searchRequestContext.getPivotKeys().values().contains(aPivot.getKey())
? " cannot be used more than once.":" does not reference a facet Field, range or stats.";
throw new InvalidArgumentException(InvalidArgumentException.DEFAULT_MESSAGE_ID,
new Object[] { ": Pivot parameter " + aPivot.getKey() + " does not reference a facet Field, range or stats." });
new Object[] { ": Pivot parameter " + aPivot.getKey() + invalidMessage });
}
if (aPivot.getPivots() != null && !aPivot.getPivots().isEmpty() && aPivot.getPivots().size()>1)