jsedding commented on code in PR #53: URL: https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/53#discussion_r1611598811
########## src/main/java/org/apache/sling/jcr/repoinit/impl/NodePropertiesVisitor.java: ########## @@ -118,23 +116,25 @@ public NodePropertiesVisitor(Session s) { * is the same as the autocreated default value * * @param n the node to check - * @param pRelPath the property relative path to check + * @param propertyPath the property relative path to check * @return true or false */ - protected static boolean isUnchangedAutocreatedProperty(Node n, final String pRelPath) + protected static boolean isUnchangedAutocreatedProperty(Node n, final String propertyPath) throws RepositoryException { boolean sameAsDefault = false; // deal with the pRelPath nesting - Path path = Paths.get(pRelPath); - Path parentPath = path.getParent(); - String name = path.getFileName().toString(); - if (parentPath != null) { - String relPath = parentPath.toString(); - if (n.hasNode(relPath)) { - n = n.getNode(relPath); - } else { - n = null; + final int pos = propertyPath.lastIndexOf("/"); Review Comment: ... and then finally addressed by using the JCR API instead of reimplementing its functionality. -- 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...@sling.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org