nfsantos commented on code in PR #1461:
URL: https://github.com/apache/jackrabbit-oak/pull/1461#discussion_r1602707774


##########
oak-store-spi/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStateUtils.java:
##########
@@ -53,12 +52,7 @@ public static boolean isHidden(@NotNull String name) {
      * @return true if one of the nodes is hidden
      */
     public static boolean isHiddenPath(@NotNull String path) {
-        for (String n : PathUtils.elements(path)) {
-            if (isHidden(n)) {
-                return true;
-            }
-        }
-        return false;
+        return (!path.isEmpty() && path.charAt(0) == ':') || 
path.contains("/:");

Review Comment:
   Good point. But the check in `PathUtils.elements(path)` is done by an 
`assert`. And very likely asserts will be disabled in production (the default 
in the JVM is disabled). And in any case, it is bad practice to rely on asserts 
in production. So I think it is ok to change the behavior.



-- 
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: dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to