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

Fix NPE on JMX reloadDefaultConfiguration when no configuration file is used #302

Merged
merged 1 commit into from Feb 23, 2016

Conversation

Projects
None yet
2 participants
@vpavic
Copy link
Contributor

commented Feb 23, 2016

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?

@vpavic

This comment has been minimized.

Copy link
Contributor Author

commented Feb 23, 2016

Closing & re-opening to force a new CI build.
The failed test passes for me locally.

@vpavic vpavic closed this Feb 23, 2016

@vpavic vpavic reopened this Feb 23, 2016

@ceki

This comment has been minimized.

Copy link
Member

commented Feb 23, 2016

The CLA is not mandatory for this contribution as it is only few lines long. However, you are welcome to send me a singled CLA if you wish to do so.

@vpavic

This comment has been minimized.

Copy link
Contributor Author

commented Feb 23, 2016

@ceki I've sent you signed copy of the CLA according to instructions found in contribution guideline doc.

Regarding the PR, Travis CI failure seems unrelated to this change.

ceki added a commit that referenced this pull request Feb 23, 2016

Merge pull request #302 from vpavic/fix-jmx-reload-npe
Fix NPE on JMX reloadDefaultConfiguration when no configuration file is used

@ceki ceki merged commit a8baccf into qos-ch:master Feb 23, 2016

1 check failed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
@ceki

This comment has been minimized.

Copy link
Member

commented Feb 23, 2016

@vpavic thank you for the cla. Travis CI failure is unlikely to be related to this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.