nfsantos commented on code in PR #1516: URL: https://github.com/apache/jackrabbit-oak/pull/1516#discussion_r1634542428
########## oak-store-spi/src/main/java/org/apache/jackrabbit/oak/json/JsonDeserializer.java: ########## @@ -240,9 +239,10 @@ boolean hasOrderableChildren(NodeBuilder builder) { } private boolean hasSingleColon(String jsonString) { - //In case the primaryType was encoded then it would be like nam:oak:Unstructured - //So check if there is only one occurrence of ';' - return CharMatcher.is(':').countIn(jsonString) == 1; + // In case the primaryType was encoded then it would be like + // "nam:oak:Unstructured". So check if there is only one occurrence + // of ':'. + return jsonString.replace(":", "").length() == jsonString.length() - 1; Review Comment: Actually, it was copilot who wrote that code. :) -- 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