You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2023/05/08 18:05:00 UTC

[jira] [Updated] (SLING-11866) WebconsoleConfigurationHandler does not filter out default values coming from ConfigTaskCreator.getDefaultProperties

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

Konrad Windszus updated SLING-11866:
------------------------------------
    Description: 
Although {{MetatypeHandler.updateConfiguration}} takes the default configurations identified via {{ConfigTaskCreator.getDefaultProperties(...)}} as fourth argument it will never strip those properties from the props to update. Therefore {{WebconsoleConfigurationHandler.updateConfiguration(...)}} will only ever strip properties which have
a) a default which is equal to the value to be set and
b) which are not contained in {{ConfigTaskCreator.getDefaultProperties(...)}}


b) just seem to be wrong as the logic should rather be:
strip all properties whose value is either equal to the metatype default value or the default value coming from the same named property of the the configuration provided by any of the MERGE_SCHEME configs.

  was:
Although {{MetatypeHandler.updateConfiguration}} takes the default configurations identified via {{ConfigTaskCreator.getDefaultProperties(...)}} as fourth argument it will never strip those properties from the props to update. Therefore WebconsoleConfigurationHandler.updateConfiguration(...) will only ever strip properties which have
a) a default which is equal to the value to be set and
b) which are not contained in {{ConfigTaskCreator.getDefaultProperties(...)}}


b) just seem to be wrong as the logic should rather be:
strip all properties whose value is either equal to the metatype default value or the default value coming from the same named property of the the configuration provided by any of the MERGE_SCHEME configs.


> WebconsoleConfigurationHandler does not filter out default values coming from ConfigTaskCreator.getDefaultProperties 
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: SLING-11866
>                 URL: https://issues.apache.org/jira/browse/SLING-11866
>             Project: Sling
>          Issue Type: Bug
>          Components: Installer
>    Affects Versions: Installer Configuration Factory 1.4.2
>            Reporter: Konrad Windszus
>            Priority: Major
>
> Although {{MetatypeHandler.updateConfiguration}} takes the default configurations identified via {{ConfigTaskCreator.getDefaultProperties(...)}} as fourth argument it will never strip those properties from the props to update. Therefore {{WebconsoleConfigurationHandler.updateConfiguration(...)}} will only ever strip properties which have
> a) a default which is equal to the value to be set and
> b) which are not contained in {{ConfigTaskCreator.getDefaultProperties(...)}}
> b) just seem to be wrong as the logic should rather be:
> strip all properties whose value is either equal to the metatype default value or the default value coming from the same named property of the the configuration provided by any of the MERGE_SCHEME configs.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)