Skip to content
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

[CI] testUsageDOMWrapper fails #1

Closed
carlosame opened this issue Jul 3, 2022 · 0 comments
Closed

[CI] testUsageDOMWrapper fails #1

carlosame opened this issue Jul 3, 2022 · 0 comments
Assignees

Comments

@carlosame
Copy link
Member

The CI test testUsageDOMWrapper fails with the following error:

org.junit.ComparisonFailure: expected:<<html[><head><title>Example</title><style]><![CDATA[div>p{font...> but was:<<html[ xmlns="http://www.w3.org/1999/xhtml"><head><title>Example</title><style xml:space="preserve"]><![CDATA[div>p{font...>
	at org.junit.Assert.assertEquals(Assert.java:117)

It seems that the JDK is now using EntityResolver2 to resolve the DTD in DTD-less documents, and given that the test is setting an EntityResolver2-capable DefaultEntityResolver to DocumentBuilder, the builder then adds a xmlns attribute to the html element and a xml:space attribute to style.

The easiest solution is to remove the DefaultEntityResolver which wasn't being used in this case anyway.

@carlosame carlosame self-assigned this Jul 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant