RFR(JDK 14/java.xml) 8223291: Whitespace is added to CDATA tags when using OutputKeys.INDENT to format XML

Joe Wang huizhe.wang at oracle.com
Tue Jul 2 15:51:11 UTC 2019


Thanks Daniel. That test case is added.

Best,
Joe

On 7/2/19, 1:21 AM, Daniel Fuchs wrote:
> Hi Joe,
>
> I haven't spotted anything obviously wrong.
>
>> The content of "abc<![CDATA[ & ]]>xyz" should be "abc & xyz", not 
>> "    abc\n & \n    xyz\n" as that before this fix. 
>
> Maybe the test could have a test case for that specific example too?
> Just to make sure whitespaces in CDATA aren't eaten away?
>
> best regards,
>
> -- daniel
>
>
> On 01/07/2019 20:46, Joe Wang wrote:
>> Please review a fix to xml pretty print. This is a regression 
>> introduced during the JDK 9 development. CDATA is marked up to be 
>> interpreted literally as textual data, in other words, it's still 
>> character data. The processor therefore shall treat it as text data. 
>> The content of "abc<![CDATA[ & ]]>xyz" should be "abc & xyz", not 
>> "    abc\n & \n xyz\n" as that before this fix.
>>
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8223291
>> webrev: http://cr.openjdk.java.net/~joehw/jdk14/8223291/webrev/
>>
>> Thanks,
>> Joe
>>
>


More information about the core-libs-dev mailing list