Fix metadata parser in RemoteAdminCommand.java - #26168
Open
JackienStephan wants to merge 3 commits into
Open
Conversation
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
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because of the
OutputKeys.INDENThas been set to "yes" in theXMLContentActionReporter,(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().