jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1329861 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/name/NamespaceMappings.java
Date Tue, 24 Apr 2012 17:07:35 GMT
Author: reschke
Date: Tue Apr 24 17:07:35 2012
New Revision: 1329861

URL: http://svn.apache.org/viewvc?rev=1329861&view=rev
Log:
handle non-existing ns mappings in store grracefully

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=1329861&r1=1329860&r2=1329861&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
Tue Apr 24 17:07:35 2012
@@ -145,9 +145,11 @@ public class NamespaceMappings {
         }
 
         Tree namespaces = getNamespaces(session.getCurrentRoot(), false);
-        for (PropertyState property : namespaces.getProperties()) {
-            if (uri.equals(property.getValue().getString())) {
-                return property.getName();
+        if (namespaces != null) {
+            for (PropertyState property : namespaces.getProperties()) {
+                if (uri.equals(property.getValue().getString())) {
+                    return property.getName();
+                }
             }
         }
 



Mime
View raw message