Henry Kuijpers created SLING-11039: -------------------------------------- Summary: 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 Reporter: Henry Kuijpers
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)