[ https://issues.apache.org/jira/browse/SLING-10084?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17270844#comment-17270844 ]
Carsten Ziegeler commented on SLING-10084: ------------------------------------------ While I initially also thought that we should validate while reading/writing the feature - as also written in the description - I think we should probably do this within the Configuration object as well; meaning the properties map there should be case-insentive. This way you can't create an invalid properties set using the Java API, but also downstream users of the Java API can safely assume that there are no duplicate keys; if we don't handle it within the Configuration object, then at least in theory all users of the Java API, need to handle case-insensitivity. So my suggestion is: we handle it while reading a feature - failing with duplicate keys and make the properties dictionary case-insensitive. > Prevent the creation of configuration properties with duplicate keys > -------------------------------------------------------------------- > > Key: SLING-10084 > URL: https://issues.apache.org/jira/browse/SLING-10084 > Project: Sling > Issue Type: Improvement > Components: Feature Model > Affects Versions: Feature Model 1.2.18 > Reporter: A. J. David Bosschaert > Assignee: A. J. David Bosschaert > Priority: Major > Fix For: Feature Model 1.2.20 > > > Having 2 (or more) properties in a single configuration with the same key > regardless of capitalization is an invalid situation and should not be > allowed in feature models. > When reading or writing a feature we should fail if the feature is detected > to have duplicate property keys within a single PID by comparing the keys in > a case insensitive way. -- This message was sent by Atlassian Jira (v8.3.4#803005)