Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that configurations can be injected without calling update #815

Merged
merged 1 commit into from
Feb 28, 2024

Conversation

timothyjward
Copy link
Contributor

Fixes #780 - it is supposed to be possible to inject configurations that have not been updated so that tests can view the pre and post update state of the system. This was not possible (despite being hinted at in the JavaDoc) as such configurations were always 'new' and therefore were updated with an empty dictionary. This commit fixes the check for this and avoids updating configurations with no properties set if, and only if, the configuration is being injected. It also then fixes a few places where the resulting null properties caused exceptions internally in the ConfigurationExtension.

Fixes osgi#780 - it is supposed to be possible to inject configurations that have not been updated so that tests can view the pre and post update state of the system. This was not possible (despite being hinted at in the JavaDoc) as such configurations were always 'new' and therefore were updated with an empty dictionary. This commit fixes the check for this and avoids updating configurations with no properties set if, and only if, the configuration is being injected. It also then fixes a few places where the resulting null properties caused exceptions internally in the ConfigurationExtension.

Signed-off-by: Tim Ward <timothyjward@apache.org>
@timothyjward timothyjward merged commit cbb9cd8 into osgi:main Feb 28, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide a possibillity to inject and empty configuration where update has not been called yet
2 participants