RM-2113. Acting on review comments.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@103781 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Neil McErlean
2015-05-06 16:11:16 +00:00
parent 743d838ee1
commit 0fbe2e59b0

View File

@@ -101,7 +101,14 @@ public final class UserQueryParams
if (otherElems != null)
{
elementList.addAll(asList(otherElems));
final List<T> 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;