jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r997062 - /jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/AbstractPath.java
Date Tue, 14 Sep 2010 20:03:22 GMT
Author: jukka
Date: Tue Sep 14 20:03:22 2010
New Revision: 997062

URL: http://svn.apache.org/viewvc?rev=997062&view=rev
Log:
JCR-2744: Avoid element arrays in PathImpl

Correct handling of a special case in computeRelativePath()

Modified:
    jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/AbstractPath.java

Modified: jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/AbstractPath.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/AbstractPath.java?rev=997062&r1=997061&r2=997062&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/AbstractPath.java
(original)
+++ jackrabbit/trunk/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/name/AbstractPath.java
Tue Sep 14 20:03:22 2010
@@ -108,15 +108,15 @@ abstract class AbstractPath implements P
                     }
                 }
 
+                if (path == null) {
+                    path = new CurrentPath(null);
+                }
+
                 while (bi < b.length) {
                     path = path.resolve(b[bi++]);
                 }
 
-                if (path != null) {
-                    return path;
-                } else {
-                    return new CurrentPath(null);
-                }
+                return path;
             }
         }
         throw new RepositoryException(



Mime
View raw message