jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1470414 - /jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/CachingNameResolver.java
Date Mon, 22 Apr 2013 09:03:45 GMT
Author: mreutegg
Date: Mon Apr 22 09:03:45 2013
New Revision: 1470414

URL: http://svn.apache.org/r1470414
Log:
JCR-3571: Light optimizatin for CachingNameResolver.getJCRName(Name)
- Patch by Sergiy Shyrkov

Modified:
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/CachingNameResolver.java

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/CachingNameResolver.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/CachingNameResolver.java?rev=1470414&r1=1470413&r2=1470414&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/CachingNameResolver.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/CachingNameResolver.java
Mon Apr 22 09:03:45 2013
@@ -90,6 +90,9 @@ public class CachingNameResolver impleme
      * @throws NamespaceException if the namespace URI can not be resolved
      */
     public String getJCRName(Name name) throws NamespaceException {
+        if (name.getNamespaceURI().length() == 0) {
+            return name.getLocalName();
+        }
         String jcrName = (String) cache.get(name);
         if (jcrName == null) {
             jcrName = resolver.getJCRName(name);



Mime
View raw message