jsedding commented on code in PR #53:
URL: 
https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/53#discussion_r1611427296


##########
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:
   addressed by moving to `org.apache.jackrabbit.util.Text`



-- 
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

Reply via email to