When running the test suite in 2.23, there is the following faillure.
[ERROR] elementNames(org.htmlcleaner.HtmlCleanerTest) Time elapsed: 0.013 s <<
< FAILURE!
org.junit.ComparisonFailure:
expected:<<p>
[<b></b>
]</p>> but was:<<p>
[ <b></b>
]</p>>
at org.htmlcleaner.HtmlCleanerTest.elementNames(HtmlCleanerTest.java:227
)
Well that's odd. It passes here locally, and it also passed during the release process (Maven always runs all unit tests during build and release).
I'm running the tests with java 11. Do you have any hint of where to look to understand this failure?
To some extent it depends on the implementation of the DOM interface installed on a specific system, which can vary. Its usually the Oracle/Sun one or Apache Xerces.
This article might help:
https://stackoverflow.com/questions/4142776/changing-default-implementation-of-org-w3c-dom-document
As this affects the default Transformer implementation in openjdk 11 (which does not seem to obey INDENT properties), I think this should be worked around.
The following patch works around the issue.
Thanks for the patch @niol - I did wonder if this was related to OpenJDK.
Patch applied, it'll be in the next release.