-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: encoding error when parsing a ISO-8859-1 pom with Maven Resolver #163
Comments
Will take a look. Is your POM public? |
Yes, in my case the problem was with https://repo1.maven.org/maven2/org/apache/commons/commons-parent/39/commons-parent-39.pom (when resolving the parents of |
@belingueres Can you have a look at this? |
I feel like |
So it should autodiscover the encoding itself? |
No, just not compare the encoding with the declaration when it does not know what encoding the reader uses, same as before this change. |
Makes sense. |
I'll take a look at it. |
…ISO-8859-1 xml - Fixed code. - Added tests.
We just ran into the same issue and after a bit of searching found the bug ... only to then see this issue that perfectly captures what's going on 😄 Thanks for raising it @tmortagne and for the quick fix @belingueres , can we expect a patch soon? |
closes by belingueres@f999bdb |
releasing today |
* codehaus-plexus#163 - new case: Don't assume UTF8 as default, to allow parsing from String. * codehaus-plexus#194 - Incorrect getText() after parsing the DOCDECL section.
* codehaus-plexus#163 - new case: Don't assume UTF8 as default, to allow parsing from String. * codehaus-plexus#194 - Incorrect getText() after parsing the DOCDECL section.
* codehaus-plexus#163 - new case: Don't assume UTF8 as default, to allow parsing from String. * codehaus-plexus#194 - Incorrect getText() after parsing the DOCDECL section. * Added tests exercising other regressions exposed while fixing this issues.
* codehaus-plexus#163 - new case: Don't assume UTF8 as default, to allow parsing from String. * codehaus-plexus#194 - Incorrect getText() after parsing the DOCDECL section. * Added tests exercising other regressions exposed while fixing this issues.
Maven Resolver (at least the 3.6.0 one) model processor uses
ReaderFactory#newXmlReader
to create aXmlStreamReader
and then pass it toMXParser
.Problem is that since 1e18ddc MXParser assumes the input encoding is UTF8 and only changes that if the input reader is a
InputStreamReader
(which is not the case here since it's a XmlStreamReader). So we end up with exception:This whole check is not really needed here since XmlStreamReader is taking care of potential encoding issues already from what I understand.
The text was updated successfully, but these errors were encountered: