Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Protect against NPE caused by recursive calls
Update `SpringBootConfigurationFactory` so that it no longer attempts to get a `LoggingSystem`. The recent `LoggingSystem` update means makes use of the `SpringFactoriesLoader` class to load candidate logging systems. Unfortunately, the `SpringFactoriesLoader` class creates a `Logger` which (when using Log4J2) causes `SpringBootConfigurationFactory` to run. Calling `LoggingSystem.get` from `SpringBootConfigurationFactory` results in a recursive call to `SpringFactoriesLoader` which hasn't yet been fully initialized. We then see an NPE caused by a `null` `cache`. This update removes the call to `LoggingSystem.get` with the assumption that it would never return `null` anyway. Fixes gh-24163
- Loading branch information