Skip to content

Conversation

@FelixMarxIBM
Copy link

@FelixMarxIBM FelixMarxIBM commented Nov 24, 2025

Replace getConfiguration() call with listConfigurations() in ConfigInstaller.configurationEvent() method to avoid unintentionally creating new configurations. The getConfiguration() method creates a configuration if it doesn't exist, which is not the desired behavior when simply checking for existing configurations.

Changes:

  • Use listConfigurations("(service.pid=" + pid + ")") instead of getConfiguration(pid, "?")
  • Add proper null and length checks for configuration arrays
  • Update corresponding test mocks to reflect the corrected API usage

This fixes an issue with felix fileinstall reacting upon the CM_UPDATED events and creating a configuration that was already deleted.

…getConfiguration

Replace getConfiguration() calls with listConfigurations() in
ConfigInstaller.configurationEvent() method to avoid unintentionally
creating new configurations. The getConfiguration() method creates a
configuration if it doesn't exist, which is not the desired behavior
when simply checking for existing configurations.

Changes:
- Use listConfigurations("(service.pid=" + pid + ")") instead of getConfiguration(pid, "?")
- Add proper null and length checks for configuration arrays
- Update corresponding test mocks to reflect the corrected API usage

This prevents unwanted configuration creation during configuration
event handling.
@stbischof stbischof self-assigned this Nov 25, 2025
Copy link
Contributor

@stbischof stbischof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

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.

2 participants