jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1421209 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/GlobalNameMapper.java
Date Thu, 13 Dec 2012 10:41:08 GMT
Author: jukka
Date: Thu Dec 13 10:41:08 2012
New Revision: 1421209

URL: http://svn.apache.org/viewvc?rev=1421209&view=rev
Log:
OAK-509: Item names starting with '{X}' cause RepositoryException

Fix handling of expanded names

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/GlobalNameMapper.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/GlobalNameMapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/GlobalNameMapper.java?rev=1421209&r1=1421208&r2=1421209&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/GlobalNameMapper.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/namepath/GlobalNameMapper.java
Thu Dec 13 10:41:08 2012
@@ -66,11 +66,13 @@ public abstract class GlobalNameMapper i
                 String oakPrefix = getOakPrefixOrNull(uri);
                 if (oakPrefix != null) {
                     return oakPrefix + ':' + expandedName.substring(brace + 1);
+                } else {
+                    return null; // no matching namespace prefix
                 }
             }
         }
 
-        return null; // invalid or unmapped name
+        return expandedName; // not an expanded name
     }
 
     protected abstract Map<String, String> getNamespaceMap();



Mime
View raw message