Backport the UTF-8-without-BOM and ISO-8859-1 parsing fix to 3.x - #91
Merged
Conversation
* do not try to discover the encoding used when the input is given a Reader * simplified test-encoding-ISO-8859-1.xml test file * fixed tests exercising encoding checks. Unsupported tests were skipped --------- Co-authored-by: Gabriel Belingueres <belingueres@gmail.com> (cherry picked from commit 300a4e4)
slachiewicz
marked this pull request as ready for review
August 16, 2026 19:49
This was referenced Aug 17, 2026
slachiewicz
added a commit
that referenced
this pull request
Aug 17, 2026
Release Drafter v7 resolves config-name against the ref that triggered the run, not against the default branch. The file has only ever lived on master, so every push to 3.x since the v6 -> v7 bump in #80 has failed with Repo load failed. Config file not found with error 404. (target: codehaus-plexus/.github:.github/release-drafter-3.x.yml) and the 3.x draft has not been updated since June 2025 - it is missing #85, #89, #91 and #93. Do not delete this copy as a duplicate of master's: both branches need their own, and master's release-drafter-3.x.yml is now the dead one.
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.
Backport of #1 (
300a4e49) to the 3.x line, reported in #82.The 3.x line is what Maven 3.9 ships, so a UTF-8 file with no BOM and an
ISO-8859-1declaration still fails there withUTF-8 BOM plus xml decl of ISO-8859-1 is incompatible.MXParsersniffed an encoding off theReaderand cross-checked it against the XML declaration; the sniffed value is the stream default, not the file's encoding, so the check fired on valid documents. Detection is left toXmlStreamReader, which reports a real mismatch asXmlStreamReaderException.hst-lhs-007/008/009are restored to driving the parser throughsetInput(InputStream, null), which is the path the fix changes — on 3.x they had been rewritten to hand-built readers that bypassed it.ReaderFactoryis kept where 3.x already used it, so the diff against master stays limited to the fix itself.Verified: reverting
XmlReaderandMXParserto their pre-fix state fails 5 of these tests with the reported message; restoring them gives 214 passing.This change was created with AI assistance.