You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Karl Pauls (Jira)" <ji...@apache.org> on 2021/10/08 12:39:00 UTC

[jira] [Updated] (SLING-10859) runmode.mapping file does not contain all needed values

     [ https://issues.apache.org/jira/browse/SLING-10859?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Karl Pauls updated SLING-10859:
-------------------------------
    Affects Version/s:     (was: Content-Package to Feature Model Converter 1.1.6)
                       Content-Package to Feature Model Converter 1.1.10

> 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.10
>            Reporter: A. J. David Bosschaert
>            Priority: Major
>
> 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)