jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r577856 - /jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/PredefinedNodeTypeTest.java
Date Thu, 20 Sep 2007 18:33:03 GMT
Author: jukka
Date: Thu Sep 20 11:33:02 2007
New Revision: 577856

URL: http://svn.apache.org/viewvc?rev=577856&view=rev
Log:
1.3: Merged revision 568601 (JCR-1074)

Modified:
    jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/PredefinedNodeTypeTest.java

Modified: jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/PredefinedNodeTypeTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/PredefinedNodeTypeTest.java?rev=577856&r1=577855&r2=577856&view=diff
==============================================================================
--- jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/PredefinedNodeTypeTest.java
(original)
+++ jackrabbit/branches/1.3/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/nodetype/PredefinedNodeTypeTest.java
Thu Sep 20 11:33:02 2007
@@ -261,21 +261,22 @@
         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++) {
-                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());
-                }
+        Arrays.sort(supertypes, NODE_TYPE_COMPARATOR);
+        boolean hasPrinted = false;
+        for (int i = 0; i < supertypes.length; i++) {
+            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());
+                hasPrinted = true;
             }
-        } else {
+        }
+        if (!hasPrinted) {
             writer.println("  []");
         }
         writer.println("IsMixin");



Mime
View raw message