JDK-8256685 : Behavior change in XML since JDK 8u271
  • Type: Bug
  • Component: xml
  • Sub-Component: jaxp
  • Affected Version: 8u271
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2020-11-19
  • Updated: 2021-04-01
  • Resolved: 2020-12-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8u271Fixed
Related Reports
Relates :  
Description
A xml behavior change between jdk 1.8.0_251 to jdk 1.8.0_271 has been observed.

When using the method Element::appendChild and use the format format-pretty-print to true
to write the xml document. 

It was found that in 8u271 a \n is introduced which does not occur in 8u251.


Example:
----jdk8u251---
<root>
    <item/>
</root>

---jdk8u271---
<root>
    <item>
    </item>
</root>