bdelacretaz commented on a change in pull request #19:
URL: 
https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/19#discussion_r648092308



##########
File path: src/main/java/org/apache/sling/jcr/repoinit/impl/AclVisitor.java
##########
@@ -142,7 +142,9 @@ public void visitCreatePath(CreatePath cp) {
         for (PathSegmentDefinition psd : cp.getDefinitions()) {
             final String fullPath = parentPath + "/" + psd.getSegment();
             try {
-                if (session.itemExists(fullPath)) {
+                if (session.propertyExists(fullPath)) {
+                    throw new RuntimeException("Error creating Node at " + 
fullPath + ": a property exists with the same path");
+                } else if (session.itemExists(fullPath)) {
                     log.info("Path already exists, nothing to do (and not 
checking its primary type for now): {}", fullPath);

Review comment:
       Agreed, I have made that change and also changed the log message to say 
"Node"




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to