A. J. David Bosschaert created SLING-10859: ----------------------------------------------
Summary: runmode.mapping file does not contain all needed values Key: SLING-10859 URL: https://issues.apache.org/jira/browse/SLING-10859 Project: Sling Issue Type: Bug Components: Content-Package to Feature Model Converter Affects Versions: Content-Package to Feature Model Converter 1.1.6 Reporter: A. J. David Bosschaert In some cases the {{runmode.mapping}} file generated by the cpconverter does not contain all the required file (feature model) references. This can happen when certain filenames that need to be referenced are a substring of other file names. It centers around this code: https://github.com/apache/sling-org-apache-sling-feature-cpconverter/blob/master/src/main/java/org/apache/sling/feature/cpconverter/features/RunmodeMapper.java#L63-L67 Assume that {{properties}} contains an entry {{(default)=>my-webapp-all.json}}. Then next a feature file named {{all.json}} is processed. As the name of it is a substring of the pre-existing value it will not append. In fact it will replace the previous value with the new value and as such remove it. The logic there should be fixed to not use substrings, but rather compare entire names. Possibly a better idea would be to keep a Set<String> internally and convert that to a comma-separated list only once the Properties are persisted in the {{save(()}} call. -- This message was sent by Atlassian Jira (v8.3.4#803005)