jmestwa-coder opened a new pull request, #662: URL: https://github.com/apache/logging-log4cxx/pull/662
## Summary Fixes `PropertyConfigurator` incorrectly reporting a successful configuration when an appender fails to instantiate. ## Root Cause `registryGet()` used `std::map::operator[]` during lookup, which inserted a null entry for missing appenders. This caused the internal registry to become non-empty even when no appenders were successfully created, leading to: - `ConfigurationStatus::Configured` being returned incorrectly - repository marked as configured despite failed appender creation ## Fix Replace the mutating lookup with a non-mutating `find()` lookup in `registryGet()`. This preserves registry state during failed appender resolution and restores correct configured-state behavior. ## Tests Added `testInvalidAppenderBehavesNotConfigured` covering: - invalid appender class configuration - `ConfigurationStatus::NotConfigured` - repository remains unconfigured - no appenders attached to the root logger ## Validation - Reproduced issue before patch with invalid appender configuration - Verified corrected behavior after patch - Ran `propertyconfiguratortest` - Ran relevant `ctest` validation - `git diff --check` clean -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
