mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.2.N (5.2.1) to HEAD (5.2)
130291 gjames: Merged searchapi (5.2.1) to 5.2.N (5.2.1) 130030 gjames: Manual merge of r129730 and r129731:mmuller:Add a specific error message for invalid maxItem and skipCount. REPO-1061 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@130363 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -356,11 +356,20 @@ public interface RecognizedParamsExtractor
|
|||||||
}
|
}
|
||||||
catch (NumberFormatException error)
|
catch (NumberFormatException error)
|
||||||
{
|
{
|
||||||
|
String errorMsg = "Invalid paging parameters skipCount: " + skip + ", maxItems:" + maxItems;
|
||||||
if (rpeLogger().isDebugEnabled())
|
if (rpeLogger().isDebugEnabled())
|
||||||
{
|
{
|
||||||
rpeLogger().debug("Invalid paging params skip: " + skip + ",maxItems:" + maxItems);
|
rpeLogger().debug(errorMsg);
|
||||||
}
|
}
|
||||||
throw new InvalidArgumentException();
|
if (skip == null)
|
||||||
|
{
|
||||||
|
errorMsg = "Invalid paging parameter maxItems:" + maxItems;
|
||||||
|
}
|
||||||
|
if (maxItems == null)
|
||||||
|
{
|
||||||
|
errorMsg = "Invalid paging parameter skipCount:" + skip;
|
||||||
|
}
|
||||||
|
throw new InvalidArgumentException(errorMsg);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Paging.valueOf(skipped, max);
|
return Paging.valueOf(skipped, max);
|
||||||
|
Reference in New Issue
Block a user