jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1334025 - in /jackrabbit/oak/trunk: oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceMappings.java oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
Date Fri, 04 May 2012 15:18:35 GMT
Author: reschke
Date: Fri May  4 15:18:34 2012
New Revision: 1334025

URL: http://svn.apache.org/viewvc?rev=1334025&view=rev
Log:
create jcr:system with type, enhance diagnostics

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceMappings.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.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=1334025&r1=1334024&r2=1334025&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:18:34 2012
@@ -16,12 +16,14 @@
 */
 package org.apache.jackrabbit.oak.plugins.name;
 
+import org.apache.jackrabbit.JcrConstants;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.api.ContentSession;
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.Tree;
 
+import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
 import java.util.Arrays;
 import java.util.HashMap;
@@ -190,7 +192,7 @@ public class NamespaceMappings {
         root.commit();
     }
 
-    private static Tree getNamespaces(Root root, boolean create) {
+    private Tree getNamespaces(Root root, boolean create) {
         Tree tree = root.getTree("/");
         Tree system = tree.getChild("jcr:system");
         if (system == null) {
@@ -203,6 +205,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));
         }
         return namespaces;
     }

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java?rev=1334025&r1=1334024&r2=1334025&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/NodeImpl.java
Fri May  4 15:18:34 2012
@@ -401,7 +401,7 @@ public class NodeImpl extends ItemImpl i
 
         Property property = getPropertyOrNull(relPath);
         if (property == null) {
-            throw new PathNotFoundException(relPath);
+            throw new PathNotFoundException(relPath + " not found on " + getPath());
         } else {
             return property;
         }



Mime
View raw message