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

Avoid npe in toString of HealthCheck.Result #1141

Merged
merged 1 commit into from
Jun 16, 2017
Merged

Avoid npe in toString of HealthCheck.Result #1141

merged 1 commit into from
Jun 16, 2017

Conversation

georgespalding
Copy link
Contributor

Use String.valueOf in toString of HealthCheck.Result to avoid NullPointerException when it has a detail with null value.
Prepend ", " to any details, to make the resulting String more readable.

Use String.valueOf in toString of HealthCheck.Result to avoid NullPointerException when it has a detail with null value.
Prepend ", " to any details, to make the resulting String more readable.
@georgespalding
Copy link
Contributor Author

This issue burned me when debugging HealthChecks.
F.x doing LOG.debug("What is happening {}", healthcheck)
Causes the NPE to happen when enabling debug logging.

@arteam arteam merged commit 1e39afa into dropwizard:3.2-development Jun 16, 2017
@arteam
Copy link
Member

arteam commented Jun 16, 2017

LGTM. Thanks for submitting the fix!

@arteam arteam added the bug label Jun 16, 2017
@arteam arteam added this to the 3.2.3 milestone Jun 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants