jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r960030 - /jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeUtil.java
Date Fri, 02 Jul 2010 15:34:09 GMT
Author: stefan
Date: Fri Jul  2 15:34:09 2010
New Revision: 960030

URL: http://svn.apache.org/viewvc?rev=960030&view=rev
Log:
JCR-2665: JCR Test for Adding Node Type Tests That Abstract Nodes Can Be Added as Children,
contrary to JCR 2.0 specification

Modified:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeUtil.java

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeUtil.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeUtil.java?rev=960030&r1=960029&r2=960030&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeUtil.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/NodeTypeUtil.java
Fri Jul  2 15:34:09 2010
@@ -40,7 +40,8 @@ public class NodeTypeUtil {
     public static final int ANY_PROPERTY_TYPE = -1;
 
     /**
-     * Locate a non-protected child node def parsing all node types
+     * Locate a non-protected child node def declarec by a non-abstract node type
+     * parsing all node types
      *
      * @param session                  the session to access the node types
      * @param regardDefaultPrimaryType if true, the default primary type of the
@@ -93,6 +94,10 @@ public class NodeTypeUtil {
             for (int i = 0; i < nodeDefs.length; i++) {
                 NodeDefinition nodeDef = nodeDefs[i];
 
+                if (nodeDef.getDeclaringNodeType().isAbstract()) {
+                    continue;
+                }
+
                 if (nodeDef.isProtected()) {
                     continue;
                 }



Mime
View raw message