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;
}