RFR: 8268457: XML Transformer outputs Unicode supplementary character incorrectly to HTML
Joe Wang
joehw at openjdk.java.net
Tue Jun 15 17:13:43 UTC 2021
On Fri, 11 Jun 2021 12:42:35 GMT, Masanori Yano <myano at openjdk.org> wrote:
> Hi all,
>
> Could you please review the 8268457 bug fixes?
>
> The problem is that ToHTMLStream applies processing for non-surrogate pairs to the surrogate pair.
> This fix changes the processing for non-surrogate pairs to the else condition.
The fix looks good to me.
For ToHTMLStream, please update the copyright year to 2021 (s/2019/2021) and s/@LastModified: Aug 2019/ @LastModified: June 2021.
For the test, please move it to test/jaxp/javax/xml/jaxp/unittest/transform and make it a testng test (add @run testng transform.SurrogateTest, and @Test to each test case).
For the test itself, you may replace the try-finally block with a try-with-resources statement. For comparing with the gold files, please take a look at the existing test library, specifically test/jaxp/javax/xml/jaxp/libs/jaxp/library/JAXPTestUtilities.java, and do it the testng way, e.g. Assert.assertTrue(compareWithGold(goldFile, outputFile));
-------------
PR: https://git.openjdk.java.net/jdk/pull/4474
More information about the core-libs-dev
mailing list