[ https://issues.apache.org/jira/browse/SLING-11736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17647995#comment-17647995 ]
Bertrand Delacretaz commented on SLING-11736: --------------------------------------------- I won't be able to work on this right now but what you suggest sounds reasonable to me. If someone else creates a patch I recommend writing tests which clearly demonstrate the changed behavior, as there's a minor risk of backwards incompatibility. > Create path should potentially adjust the primary type/mixin types of > existing paths > ------------------------------------------------------------------------------------ > > Key: SLING-11736 > URL: https://issues.apache.org/jira/browse/SLING-11736 > Project: Sling > Issue Type: Bug > Components: Repoinit > Affects Versions: Repoinit JCR 1.1.42 > Reporter: Konrad Windszus > Priority: Major > > Currently "create path ...." is a no-op when the path does already exist > (https://github.com/apache/sling-org-apache-sling-jcr-repoinit/blob/9913b787574186a7a31d184480cec3862816438f/src/main/java/org/apache/sling/jcr/repoinit/impl/AclVisitor.java#L191). > This is dangerous as then the path might have other primary and mixin types > and subsequent calls of "set properties ..." might fail. > Instead the primary type and mixins should potentially be adjusted on > existing nodes as well. > This happened in > https://github.com/adobe/aem-project-archetype/issues/997#issuecomment-1351895791 > which lead to not starting the repository at all. -- This message was sent by Atlassian Jira (v8.20.10#820010)