diff --git a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/classification/UserQueryParams.java b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/classification/UserQueryParams.java index 8753859cec..0396d0f8d4 100644 --- a/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/classification/UserQueryParams.java +++ b/rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/classification/UserQueryParams.java @@ -101,7 +101,14 @@ public final class UserQueryParams if (otherElems != null) { - elementList.addAll(asList(otherElems)); + final List tList = asList(otherElems); + final int firstNull = tList.indexOf(null); + if (firstNull != -1) + { + // "+ 2" so that position 1 points to 'firstElem' and so on through otherElems. + throw new IllegalArgumentException("Unexpected null element at position " + firstNull + 2); + } + elementList.addAll(tList); } return elementList;