Skip to content

Fix metadata parser in RemoteAdminCommand.java - #26168

Open
JackienStephan wants to merge 3 commits into
eclipse-ee4j:mainfrom
JackienStephan:fix-remote-admin-cmd-metadata-parser
Open

Fix metadata parser in RemoteAdminCommand.java#26168
JackienStephan wants to merge 3 commits into
eclipse-ee4j:mainfrom
JackienStephan:fix-remote-admin-cmd-metadata-parser

Conversation

@JackienStephan

@JackienStephan JackienStephan commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Because of the OutputKeys.INDENT has been set to "yes" in the XMLContentActionReporter,
(commit: c65c777, released with 7.0.18, PR #25149 )
message-part cannot be fetched by simply call getFirstChild() method,
that would be a text node with blank content as node value now.
and its attributes would be null, then result in the NPE inside getAttr(mp.getAttributes(), "message").
I think it would be safer to actually find THE first message-part element, rather than getFirstChild().

JackienStephan and others added 3 commits August 6, 2026 13:51
 Because of the OutputKeys.INDENT has been set to "yes" in the XMLContentActionReporter, (commit:c65c777ea244516e1ed5e3163332457820a3a938).
 message-part cannot be fetched by simply call "getFirstChild()" method, that would be a text node with blank content as node value now. and its attributes would be null, then result in the NPE in "getAttr" method.
 so we need to find the message-part element rather than simply call getFirstChild().
The history moved to the PR description and removed from the code.
@dmatej dmatej added this to the 8.0.5 milestone Aug 7, 2026
@dmatej dmatej added the bug Something isn't working label Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants