Merged DEV/GAV/AWE2 branch to HEAD and fixes for several integration issues.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@18473 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2010-02-05 14:07:24 +00:00
parent 1dbaca0890
commit 79852d5b1b

View File

@@ -520,11 +520,28 @@ public class Search extends BaseScopableProcessorExtension
{
if (page.get("maxItems") != null)
{
maxResults = ((Number)page.get("maxItems")).intValue();
Object maxItems = page.get("maxItems");
if (maxItems instanceof Number)
{
maxResults = ((Number)maxItems).intValue();
}
else if (maxItems instanceof String)
{
// try and convert to int (which it what it should be!)
maxResults = Integer.parseInt((String)maxItems);
}
}
if (page.get("skipCount") != null)
{
skipResults = ((Number)page.get("skipCount")).intValue();
Object skipCount = page.get("skipCount");
if (skipCount instanceof Number)
{
skipResults = ((Number)page.get("skipCount")).intValue();
}
else if (skipCount instanceof String)
{
skipResults = Integer.parseInt((String)skipCount);
}
}
}