nfsantos commented on code in PR #1596:
URL: https://github.com/apache/jackrabbit-oak/pull/1596#discussion_r1687563668
##########
oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/PathUtils.java:
##########
@@ -367,11 +367,13 @@ public static boolean isAncestor(String ancestor, String
path) {
if (denotesRoot(ancestor)) {
if (denotesRoot(path)) {
return false;
+ } else {
+ return path.startsWith(ancestor);
Review Comment:
The method has no detailed spec, for instance, it does not say what should
be the result with relative paths. And it seems to assume that paths are given
in the format "/a/b/c", not as "/a/b/c/". I tried to preserve the semantics of
the method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]