The issue was caused by the difference on handling control characters between the parser and serializer. The parser rejected control characters while the serializer converted them to NCRs. The fix is for the later to be aligned with the parser, reporting error upon encountering control characters.
Mach5 tier2 passed. ------------- Commit messages: - 8273370: Preferences.exportSubtree() generates invalid XML if value contains control char Changes: https://git.openjdk.java.net/jdk/pull/7945/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7945&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8273370 Stats: 197 lines in 4 files changed: 182 ins; 3 del; 12 mod Patch: https://git.openjdk.java.net/jdk/pull/7945.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7945/head:pull/7945 PR: https://git.openjdk.java.net/jdk/pull/7945