diff --git a/source/java/org/alfresco/rest/framework/tools/RecognizedParamsExtractor.java b/source/java/org/alfresco/rest/framework/tools/RecognizedParamsExtractor.java index c9cd7f76ab..34304ae07c 100644 --- a/source/java/org/alfresco/rest/framework/tools/RecognizedParamsExtractor.java +++ b/source/java/org/alfresco/rest/framework/tools/RecognizedParamsExtractor.java @@ -345,9 +345,13 @@ public interface RecognizedParamsExtractor { if (skip != null) { skipped = Integer.parseInt(skip);} if (maxItems != null) { max = Integer.parseInt(maxItems); } - if (max < 0 || skipped < 0) + if (skipped < 0) { - throw new InvalidArgumentException("Negative values not supported."); + throw new InvalidArgumentException("Negative values not supported for skipCount."); + } + if (max < 1) + { + throw new InvalidArgumentException("Only positive values supported for maxItems."); } } catch (NumberFormatException error)