[
https://issues.apache.org/jira/browse/FELIX-6436?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17412639#comment-17412639
]
Carsten Ziegeler commented on FELIX-6436:
-----------------------------------------
[~stefan.feilmeier] Thanks for sharing. I think you are currently relying that
whoever is creating a configuration is storing the full set of properties in
that configuration, including properties which have the default value. In the
general case that is hard to control. So I would suggest you implement
something that takes that into account, regardless of how the web console
behaves.
If you can ensure that all configurations in your system are always only done
through the web console, you were of course safe in this respect.
Now, I would be fine by putting this functionality behind a toggle which is
enabled by default and then you can disable it in your case.
For the other options, I think that changes to config ConfigurationAdmin (#2)
are out of question. The default values are not managed by configuration admin,
they are managed in your case by Declarative Service - something configadmin
does not know about.
#3 does not seem to solve your problem - although I thing that you might want
to include a check for the PID when querying - otherwise you get all
configurations which accidentally have an id property with that value
I would strongly suggest to go with #4, but as said, we can put the new
behaviour behind a toggle.
Not sure if it helps, but what if you remove the default for the "id" property.
This way it will always be set?
> Exclude default values (from metatype) in Configuration
> -------------------------------------------------------
>
> Key: FELIX-6436
> URL: https://issues.apache.org/jira/browse/FELIX-6436
> Project: Felix
> Issue Type: Improvement
> Components: Web Console
> Reporter: Carsten Ziegeler
> Assignee: Carsten Ziegeler
> Priority: Major
> Fix For: webconsole-4.6.4
>
>
> When an OSGi configuration is changed through the web console, all properties
> are set in the created/updated configuration, including those which are
> actually not set in the web console - but where just the default value is
> transfered back.
> This prohibits those configurations from using any change in the default
> values.
> The implementation could be smarter and check metatype info (if available)
> and exclude all properties with default values.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)