Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix NPE on JMX reloadDefaultConfiguration when no configuration file is used #302
NPE occurs in use cases where Logback configuration is done programmatically. For example, Spring Boot uses Logback as default logging implementation and provides various means of customizing its default configuration. Enabling JMX configurator in such setup causes reloadDefaultConfiguration JMX operation to throw NPE.
This PR adds check to conditionally run configurator if the configuration file URL is indeed available.
PR includes a test case which reproduces the issue with current implementation. If needed, I can also provide a simple Spring Boot project to reproduce the issue.
Do I need to sign the CLA for this PR?