Repository navigation
Report a clear error for an unparsable extensions.xml - #13956
Merged
gnodet merged 1 commit intoNov 12, 2026
Merged
Conversation
Port of apache#13947 (maven-3.10.x) to the `maven-4.0.x` compat layer. readCoreExtensionsDescriptor() let any failure from the XML parser escape as-is, so an empty or otherwise malformed .mvn/extensions.xml surfaced as a bare EOFException or XMLStreamException with a full stack trace instead of a message naming the problem file. Wrap the parse failure in an IOException that names the extensions file, keeping the original exception as the cause so -e still shows the full chain. Fixes apache#10258
gnodet
force-pushed
the
port/13947-extensions-xml-error-4.0.x
branch
from
November 12, 2026 15:53
a3645a0 to
56938a6
Compare
gnodet-bot
approved these changes
Nov 12, 2026
gnodet-bot
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Clean, minimal backport of #13947 to the 4.0.x compat layer. Exception wrapping preserves root cause, error message is actionable (includes file path), visibility change to package-private is justified for testability, and the test correctly validates the fix.
This review was generated by an AI agent, Hermès on behalf of @gnodet.
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.
Port of #13947 (maven-3.10.x) to the
maven-4.0.xcompat layer.readCoreExtensionsDescriptor() let any failure from the XML parser escape as-is, so an empty or otherwise malformed .mvn/extensions.xml surfaced as a bare EOFException or XMLStreamException with a full stack trace instead of a message naming the problem file.
Wrap the parse failure in an IOException that names the extensions file, keeping the original exception as the cause so -e still shows the full chain.
Fixes #10258