cziegeler closed pull request #2: SLING-7496 Factory config deleted with ConfigAdmin immediately after creation URL: https://github.com/apache/sling-org-apache-sling-installer-factory-configuration/pull/2
This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/src/main/java/org/apache/sling/installer/factories/configuration/impl/AbstractConfigTask.java b/src/main/java/org/apache/sling/installer/factories/configuration/impl/AbstractConfigTask.java index c5f4d1d..a1d628a 100644 --- a/src/main/java/org/apache/sling/installer/factories/configuration/impl/AbstractConfigTask.java +++ b/src/main/java/org/apache/sling/installer/factories/configuration/impl/AbstractConfigTask.java @@ -80,7 +80,12 @@ protected String getCompositeAliasPid() { if ( this.aliasPid == null || this.factoryPid == null ) { return null; } - final String alias = factoryPid + "." + this.aliasPid; + final String alias; + if (this.aliasPid.startsWith(this.factoryPid)) { + alias = this.aliasPid; + } else { + alias = this.factoryPid + "." + this.aliasPid; + } final int pos = this.getResource().getEntityId().indexOf(':'); if ( this.getResource().getEntityId().substring(pos + 1).equals(alias) ) { return null; ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services