Skip to content

fix(console): fix NPE in AbstractJmxCommand.execute and AbstractCommand.handleException#1967

Open
anmol-saxena-14 wants to merge 1 commit intoapache:mainfrom
anmol-saxena-14:issue-1816-A
Open

fix(console): fix NPE in AbstractJmxCommand.execute and AbstractCommand.handleException#1967
anmol-saxena-14 wants to merge 1 commit intoapache:mainfrom
anmol-saxena-14:issue-1816-A

Conversation

@anmol-saxena-14
Copy link
Copy Markdown
Contributor

AbstractJmxCommand.execute called jmxServiceUrl.toString() without a null check. jmxServiceUrl is never set in local JMX mode (--jmxlocal), so any exception thrown in that mode produced a NullPointerException instead of the real error.

AbstractCommand.handleException started cause-chain traversal from exception.getCause(), which is null for exceptions thrown without a wrapped cause (e.g. IllegalArgumentException). This caused a NullPointerException that masked the original exception and swallowed the error message entirely.

@anmol-saxena-14 anmol-saxena-14 marked this pull request as ready for review April 26, 2026 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant