jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r425992 - /jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/nodetype/PredefinedNodeTypeTest.java
Date Thu, 27 Jul 2006 07:48:40 GMT
Author: mreutegg
Date: Thu Jul 27 00:48:39 2006
New Revision: 425992

URL: http://svn.apache.org/viewvc?rev=425992&view=rev
Log:
JCR-491: TCK: PredefinedNodeTypeTest does not allow additions to the predefined node types
hierarchy

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

Modified: jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/nodetype/PredefinedNodeTypeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/nodetype/PredefinedNodeTypeTest.java?rev=425992&r1=425991&r2=425992&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/nodetype/PredefinedNodeTypeTest.java
(original)
+++ jackrabbit/trunk/jackrabbit/src/test/java/org/apache/jackrabbit/test/api/nodetype/PredefinedNodeTypeTest.java
Thu Jul 27 00:48:39 2006
@@ -28,7 +28,6 @@
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 import javax.jcr.Value;
-import javax.jcr.nodetype.ItemDefinition;
 import javax.jcr.nodetype.NodeDefinition;
 import javax.jcr.nodetype.NodeType;
 import javax.jcr.nodetype.NodeTypeIterator;
@@ -254,17 +253,27 @@
      */
     private static String getNodeTypeSpec(NodeType type)
             throws RepositoryException {
+        String typeName = type.getName();
         StringWriter buffer = new StringWriter();
 
         PrintWriter writer = new PrintWriter(buffer);
         writer.println("NodeTypeName");
-        writer.println("  " + type.getName());
+        writer.println("  " + typeName);
         writer.println("Supertypes");
         NodeType[] supertypes = type.getDeclaredSupertypes();
         if (supertypes.length > 0) {
             Arrays.sort(supertypes, NODE_TYPE_COMPARATOR);
             for (int i = 0; i < supertypes.length; i++) {
-                writer.println("  " + supertypes[i].getName());
+                String name = supertypes[i].getName();
+                if (name.startsWith("nt:") ||
+                        (name.equals("mix:referenceable") &&
+                            (typeName.equals("mix:versionable") ||
+                                typeName.equals("nt:resource") ||
+                                typeName.equals("nt:versionHistory") ||
+                                typeName.equals("nt:version") ||
+                                typeName.equals("nt:frozenNode")))) {
+                    writer.println("  " + supertypes[i].getName());
+                }
             }
         } else {
             writer.println("  []");



Mime
View raw message