anchela edited a comment on pull request #19:
URL:
https://github.com/apache/sling-org-apache-sling-jcr-repoinit/pull/19#issuecomment-856877644
@bdelacretaz somehow can't comment directly on the affect lines. here what i
would suggest to change.
instead of
```
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");
} else ...
```
i would rather write:
```
if (session.propertyExists(fullPath)) {
throw new RuntimeException("Error creating Node at "
+ fullPath + ": a property exists with the same path");
} else if (session.nodeExists(fullPath)) {
log.info("Node already exists, nothing to do (and
not checking its primary type for now");
} else ...
```
other than that the patch looks good to me.
--
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]