Add node mapper abstraction
[lgpl/argeo-commons.git] / server / runtime / org.argeo.server.jackrabbit / src / main / java / org / argeo / jcr / JcrUtils.java
index 91ca780b132b6d2eccaeb784e41f3340b2be4020..ddbb7c71f006c5f4d60fd5572fde53aef4a75340 100644 (file)
@@ -74,7 +74,7 @@ public class JcrUtils {
                if (path.charAt(path.length() - 1) == '/')
                        throw new ArgeoException("Path " + path + " cannot end with '/'");
                int index = path.lastIndexOf('/');
-               if (index <= 0)
+               if (index < 0)
                        throw new ArgeoException("Cannot find last path element for "
                                        + path);
                return path.substring(index + 1);