mreutegg commented on code in PR #560: URL: https://github.com/apache/jackrabbit-oak/pull/560#discussion_r872166417
########## oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/Utils.java: ########## @@ -365,14 +361,29 @@ private static boolean isLongPath(String path) { } // check if the parent path is long byte[] parent = PathUtils.getParentPath(path).getBytes(UTF_8); - if (parent.length < PATH_LONG) { - return false; - } - String name = PathUtils.getName(path); - if (name.getBytes(UTF_8).length > NODE_NAME_LIMIT) { - throw new IllegalArgumentException("Node name is too long: " + path); - } - return true; + return parent.length >= PATH_LONG; + } + + /** + * Checks whether Node name is too long or not based on underlining document store + * @param path node path + * @param sizeLimit sizeLimit for node name + * @return true if node name is long else false + */ + + public static boolean isNodeNameLong(String path, int sizeLimit) { Review Comment: This variant of `isNodeNameLong()` is only used by two tests. I think it's better to remove this 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: dev-unsubscr...@jackrabbit.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org