jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Reschke <julian.resc...@gmx.de>
Subject occasional TCK test failure
Date Sat, 05 May 2012 10:34:41 GMT
Hi there,

occasionally I get a test failure because the TCK discovers a node that 
lacks a primary type.

As far as I recall, it's either /jcr:system or 
/jcr:system/jcr:namespaces (of course right now it doesn't occur).

With the change below I tried to make sure the type is set, but maybe 
I'm doing something wrong?

              if (create) {
                  system = tree.addChild("jcr:system");
+                system.setProperty("jcr:primaryType", 
this.session.getCoreValueFactory().createValue("rep:system", 
PropertyType.NAME));
              } else {

Help appreciated, Julian


-------- Original Message --------
Subject: svn commit: r1334034 - 
/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceMappings.java
Date: Fri, 04 May 2012 15:32:21 -0000
From: reschke@apache.org
Reply-To: oak-commits@jackrabbit.apache.org
To: oak-commits@jackrabbit.apache.org

Author: reschke
Date: Fri May  4 15:32:20 2012
New Revision: 1334034

URL: http://svn.apache.org/viewvc?rev=1334034&view=rev
Log:
try to set node types on jcr:system and jcr:system/jcr:namespaces properly

Modified:
 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceMappings.java

Modified: 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceMappings.java
URL: 
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceMappings.java?rev=1334034&r1=1334033&r2=1334034&view=diff
==============================================================================
--- 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceMappings.java

(original)
+++ 
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceMappings.java

Fri May  4 15:32:20 2012
@@ -198,6 +198,7 @@ public class NamespaceMappings {
          if (system == null) {
              if (create) {
                  system = tree.addChild("jcr:system");
+                system.setProperty("jcr:primaryType", 
this.session.getCoreValueFactory().createValue("rep:system", 
PropertyType.NAME));
              } else {
                  return null;
              }
@@ -205,7 +206,7 @@ public class NamespaceMappings {
          Tree namespaces = system.getChild("jcr:namespaces");
          if (namespaces == null && create) {
              namespaces = system.addChild("jcr:namespaces");
-            namespaces.setProperty("jcr:primaryType", 
this.session.getCoreValueFactory().createValue("rep:system", 
PropertyType.NAME));
+            namespaces.setProperty("jcr:primaryType", 
this.session.getCoreValueFactory().createValue("nt:unstructured", 
PropertyType.NAME));
          }
          return namespaces;
      }




Mime
View raw message