jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1352866 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: plugins/name/NamespaceRegistryImpl.java query/ast/PropertyValueImpl.java
Date Fri, 22 Jun 2012 12:46:57 GMT
Author: mduerig
Date: Fri Jun 22 12:46:56 2012
New Revision: 1352866

URL: http://svn.apache.org/viewvc?rev=1352866&view=rev
Log:
- null checks
- removed broken Javadoc link

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceRegistryImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceRegistryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceRegistryImpl.java?rev=1352866&r1=1352865&r2=1352866&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceRegistryImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceRegistryImpl.java
Fri Jun 22 12:46:56 2012
@@ -31,7 +31,7 @@ import org.apache.jackrabbit.oak.api.Tre
 import org.apache.jackrabbit.oak.core.DefaultConflictHandler;
 
 /**
- * Implementation of {@link NamespaceRegistry} based on {@link NamespaceMappings}.
+ * Implementation of {@link NamespaceRegistry}.
  */
 public class NamespaceRegistryImpl implements NamespaceRegistry {
 
@@ -85,6 +85,7 @@ public class NamespaceRegistryImpl imple
 
     private static Tree getOrCreate(Root root, String... path) {
         Tree tree = root.getTree("/");
+        assert tree != null;
         for (String name : path) {
             Tree child = tree.getChild(name);
             if (child == null) {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java?rev=1352866&r1=1352865&r2=1352866&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/query/ast/PropertyValueImpl.java
Fri Jun 22 12:46:56 2012
@@ -69,6 +69,9 @@ public class PropertyValueImpl extends D
             }
             tree = tree.getChild(p);
         }
+        if (tree == null) {
+            return null;
+        }
         String name = PathUtils.getName(propertyName);
         if (!tree.hasProperty(name)) {
             return null;



Mime
View raw message