nfsantos commented on code in PR #1596:
URL: https://github.com/apache/jackrabbit-oak/pull/1596#discussion_r1687560739
##########
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:
There is a test for that case:
https://github.com/apache/jackrabbit-oak/blob/4354285d4a69efc0242a9332064b4c3f91197226/oak-commons/src/test/java/org/apache/jackrabbit/oak/commons/PathUtilsTest.java#L233
The line 371 is inside a block that is executed only when `ancestor = "/"`.
So this test is in fact just checking that path starts with "/". This is the
same test that is done in the original test in this case.
--
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]