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

ISPN-2827 Don't cause an NPE when a JMX query returns no results #1674

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -225,7 +225,7 @@ private EmsBean queryBean(String componentName) {
log.warn(String.format("More than one bean returned from applying %s pattern: %s", pattern, beans));
}
}
EmsBean bean = beans.get(0);
EmsBean bean = beans.size() > 0 ? beans.get(0) : null;
if (bean == null) {
if (log.isTraceEnabled()) log.trace("No mbean found with name " + pattern);
}
Expand Down