last segment managed when there is no '/'
[lgpl/argeo-commons.git] / 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);
        }