jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1418552 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/OakAuthorizableProperties.java
Date Fri, 07 Dec 2012 23:18:33 GMT
Author: mduerig
Date: Fri Dec  7 23:18:33 2012
New Revision: 1418552

URL: http://svn.apache.org/viewvc?rev=1418552&view=rev
Log:
avoid AIOOBE with empty string

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/OakAuthorizableProperties.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/OakAuthorizableProperties.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/OakAuthorizableProperties.java?rev=1418552&r1=1418551&r2=1418552&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/OakAuthorizableProperties.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/security/user/OakAuthorizableProperties.java
Fri Dec  7 23:18:33 2012
@@ -34,6 +34,7 @@ import org.apache.jackrabbit.oak.api.Pro
 import org.apache.jackrabbit.oak.api.Root;
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.api.TreeLocation;
+import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
 import org.apache.jackrabbit.oak.plugins.memory.PropertyStates;
 import org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager;
@@ -306,7 +307,7 @@ class OakAuthorizableProperties implemen
         if (relativePath == null) {
             throw new RepositoryException("Relative path expected. Found null.");
         }
-        if ('/' == relativePath.charAt(0)) {
+        if (PathUtils.isAbsolute(relativePath)) {
             throw new RepositoryException("Relative path expected. Found " + relativePath);
         }
     }



Mime
View raw message