jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r290913 - /incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/NodeTypeUtil.java
Date Thu, 22 Sep 2005 09:03:21 GMT
Author: mreutegg
Date: Thu Sep 22 02:03:17 2005
New Revision: 290913

URL: http://svn.apache.org/viewcvs?rev=290913&view=rev
Log:
JCR-156: Review test cases and cross check with 1.0 specification
- NodeTypeUtil.getIllegalChildNodeType() may return a legal type.

Modified:
    incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/NodeTypeUtil.java

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/NodeTypeUtil.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/NodeTypeUtil.java?rev=290913&r1=290912&r2=290913&view=diff
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/NodeTypeUtil.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/nodetype/NodeTypeUtil.java
Thu Sep 22 02:03:17 2005
@@ -380,17 +380,19 @@
         NodeTypeIterator types = manager.getAllNodeTypes();
         while (types.hasNext()) {
             NodeType type = types.nextNodeType();
-            NodeType superTypes[] = type.getSupertypes();
-            boolean isSubType = false;
-            for (int i = 0; i < superTypes.length; i++) {
-                String name = superTypes[i].getName();
-                if (name.equals(legalType)) {
-                    isSubType = true;
-                    break;
+            if (!type.getName().equals(legalType)) {
+                NodeType superTypes[] = type.getSupertypes();
+                boolean isSubType = false;
+                for (int i = 0; i < superTypes.length; i++) {
+                    String name = superTypes[i].getName();
+                    if (name.equals(legalType)) {
+                        isSubType = true;
+                        break;
+                    }
+                }
+                if (!isSubType) {
+                    return type.getName();
                 }
-            }
-            if (!isSubType) {
-                return type.getName();
             }
         }
         return null;



Mime
View raw message