last segment managed when there is no '/'
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 4 Dec 2012 17:42:39 +0000 (17:42 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 4 Dec 2012 17:42:39 +0000 (17:42 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@5896 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

server/runtime/org.argeo.server.jcr/src/main/java/org/argeo/jcr/JcrUtils.java

index 7f261b75b562a3d20ffd6445e9fc4b9d7fcf8646..154676a0e03c1e81a72f602ef5428b38d7a18944 100644 (file)
@@ -300,8 +300,7 @@ public class JcrUtils implements ArgeoJcrConstants {
                        throw new ArgeoException("Path " + path + " cannot end with '/'");
                int index = path.lastIndexOf('/');
                if (index < 0)
-                       throw new ArgeoException("Cannot find last path element for "
-                                       + path);
+                       return path;
                return path.substring(index + 1);
        }