[
https://issues.apache.org/jira/browse/SLING-11039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Seifert updated SLING-11039:
-----------------------------------
Component/s: Testing
Affects Version/s: Testing OSGi Mock 3.2.2
thanks for the pointer - can you come up with a PR as a proposal?
> Mockconfiguration#delete implementation is still wrong after SLING-10498 -
> Does not delete the configuration from persistent storage
> ------------------------------------------------------------------------------------------------------------------------------------
>
> Key: SLING-11039
> URL: https://issues.apache.org/jira/browse/SLING-11039
> Project: Sling
> Issue Type: Bug
> Components: Testing
> Affects Versions: Testing OSGi Mock 3.2.2
> Reporter: Henry Kuijpers
> Priority: Major
>
> The implementation of MockConfiguration#delete was improved a little bit in
> SLING-10498, however, it is still not according to spec.
> The "spec" that I could find is the Javadoc:
> http://docs.osgi.org/javadoc/osgi.cmpn/8.0.0/org/osgi/service/cm/Configuration.html#delete--
> It clearly implies (and also works like this at runtime, for example in
> Apache Felix) that, after calling delete, the configuration should not be
> found anymore when calling ConfigurationAdmin#getConfiguration.
> Probably, MockConfigurationAdmin#listConfigurations is working, because the
> properties in the MockConfiguration object are cleared (set to null).
> So, I think either MockConfigurationAdmin#getConfiguration should be
> improved, so that null is returned when a configuration with null props is
> found
> Or, when calling MockConfiguration#delete, the configuration has to be
> removed from the map in MockConfigurationAdmin as well +
> MockConfigurationAdmin#getConfiguration should be updated to not always force
> an instance of the configuration to end up in the map (make getConfiguration
> nullable).
--
This message was sent by Atlassian Jira
(v8.20.1#820001)