You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2014/05/27 17:31:10 UTC
svn commit: r1597805 -
/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java
Author: fmui
Date: Tue May 27 15:31:10 2014
New Revision: 1597805
URL: http://svn.apache.org/r1597805
Log:
fixed maxItems and skipCount behavior in TypeDefinitionFactory
Modified:
chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java
Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java?rev=1597805&r1=1597804&r2=1597805&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java (original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java Tue May 27 15:31:10 2014
@@ -63,7 +63,6 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.enums.ContentStreamAllowed;
import org.apache.chemistry.opencmis.commons.enums.PropertyType;
import org.apache.chemistry.opencmis.commons.enums.Updatability;
-import org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException;
import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
import org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException;
import org.apache.chemistry.opencmis.commons.impl.dataobjects.ChoiceImpl;
@@ -829,17 +828,14 @@ public final class TypeDefinitionFactory
}
int maxItemsInt = (maxItems == null ? Integer.MAX_VALUE : maxItems.intValue());
- if (maxItemsInt <= 0) {
- return result;
+ if (maxItemsInt < 0) {
+ maxItemsInt = 0;
}
int skipCountInt = (skipCount == null ? 0 : skipCount.intValue());
if (skipCountInt < 0) {
skipCountInt = 0;
}
- if (skipCountInt > allTypes.size()) {
- return result;
- }
boolean includePropertyDefinitionsBool = (includePropertyDefinitions == null ? false
: includePropertyDefinitions.booleanValue());