jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1333486 - in /jackrabbit/oak/trunk: oak-it/jcr/pom.xml oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/nodetype/NodeDefinitionImpl.java
Date Thu, 03 May 2012 14:51:19 GMT
Author: reschke
Date: Thu May  3 14:51:19 2012
New Revision: 1333486

URL: http://svn.apache.org/viewvc?rev=1333486&view=rev
Log:
OAK-66: handle types without primary child nodes, update test exclusions

Modified:
    jackrabbit/oak/trunk/oak-it/jcr/pom.xml
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/nodetype/NodeDefinitionImpl.java

Modified: jackrabbit/oak/trunk/oak-it/jcr/pom.xml
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-it/jcr/pom.xml?rev=1333486&r1=1333485&r2=1333486&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-it/jcr/pom.xml (original)
+++ jackrabbit/oak/trunk/oak-it/jcr/pom.xml Thu May  3 14:51:19 2012
@@ -97,7 +97,6 @@ org.apache.jackrabbit.test.api.SessionRe
 org.apache.jackrabbit.test.api.HasPermissionTest
 org.apache.jackrabbit.test.api.WorkspaceTest
 org.apache.jackrabbit.test.api.ShareableNodeTest
-org.apache.jackrabbit.test.api.nodetype.NodeDefTest#testGetDefaultPrimaryTypes
 org.apache.jackrabbit.test.api.nodetype.NodeTypeTest
 org.apache.jackrabbit.test.api.nodetype.PredefinedNodeTypeTest
 org.apache.jackrabbit.test.api.nodetype.CanAddChildNodeCallWithNodeTypeTest

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/nodetype/NodeDefinitionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/nodetype/NodeDefinitionImpl.java?rev=1333486&r1=1333485&r2=1333486&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/nodetype/NodeDefinitionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/nodetype/NodeDefinitionImpl.java
Thu May  3 14:51:19 2012
@@ -73,16 +73,16 @@ class NodeDefinitionImpl extends ItemDef
     @Override
     public NodeType getDefaultPrimaryType() {
         try {
-            return manager.getNodeType(getDefaultPrimaryTypeName());
+            String defaultName = getDefaultPrimaryTypeName();
+            return defaultName == null ? null : manager.getNodeType(getDefaultPrimaryTypeName());
         } catch (RepositoryException e) {
-            throw new IllegalStateException(
-                    "Inconsistent node definition: " + this, e);
+            throw new IllegalStateException("Inconsistent node definition: " + this, e);
         }
     }
 
     @Override
     public String getDefaultPrimaryTypeName() {
-        return mapper.getJcrName(defaultPrimaryTypeName);
+        return defaultPrimaryTypeName == null ? null : mapper.getJcrName(defaultPrimaryTypeName);
     }
 
     @Override



Mime
View raw message