chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1603161 - in /chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src: main/java/org/apache/chemistry/opencmis/server/support/ test/java/org/apache/chemistry/opencmis/server/support/
Date Tue, 17 Jun 2014 13:25:16 GMT
Author: fmui
Date: Tue Jun 17 13:25:16 2014
New Revision: 1603161

URL: http://svn.apache.org/r1603161
Log:
made TypeDefinitionFactory more spec compliant

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactory.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactoryTest.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=1603161&r1=1603160&r2=1603161&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 Jun 17 13:25:16 2014
@@ -927,6 +927,9 @@ public final class TypeDefinitionFactory
         if (depthInt == 0) {
             throw new IllegalArgumentException("Depth must not be 0!");
         }
+        if (typeId == null) {
+            depthInt = -1;
+        }
 
         if (typeId != null && !allTypes.containsKey(typeId)) {
             throw new CmisObjectNotFoundException("Type '" + typeId + "' does not exist!");

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactoryTest.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactoryTest.java?rev=1603161&r1=1603160&r2=1603161&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactoryTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/test/java/org/apache/chemistry/opencmis/server/support/TypeDefinitionFactoryTest.java
Tue Jun 17 13:25:16 2014
@@ -236,9 +236,6 @@ public class TypeDefinitionFactoryTest {
         typeDefs = tdf.createTypeDescendants(types, null, BigInteger.valueOf(1), null);
         assertNotNull(typeDefs);
         assertEquals(2, typeDefs.size());
-        assertEquals(0, typeDefs.get(0).getChildren().size());
-        assertEquals(0, typeDefs.get(1).getChildren().size());
-
     }
 
     @Test



Mime
View raw message