Re: RFR: 8273370: Preferences.exportSubtree() generates invalid XML if value contains control char
On Thu, 24 Mar 2022 18:21:05 GMT, Joe Wang wrote: > 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. Looks good. Thanks for the explanation, Joe. - Marked as reviewed by naoto (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/7945
Re: RFR: 8273370: Preferences.exportSubtree() generates invalid XML if value contains control char
On Thu, 24 Mar 2022 18:21:05 GMT, Joe Wang wrote: > 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. For XML 1.0, it's known that they were invalid. For prefs, it would be nice to add InvalidPreferencesFormatException to exportSubtree to match with that of importPreferences. But it's such an edge case, for this patch, I opted for no signature change. - PR: https://git.openjdk.java.net/jdk/pull/7945
Re: RFR: 8273370: Preferences.exportSubtree() generates invalid XML if value contains control char
On Thu, 24 Mar 2022 18:21:05 GMT, Joe Wang wrote: > 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. So the fix is now to throw an exception on serialization. Would there be any need to let the users know as it becomes a stricter behavior? - PR: https://git.openjdk.java.net/jdk/pull/7945
Re: RFR: 8273370: Preferences.exportSubtree() generates invalid XML if value contains control char
On Thu, 24 Mar 2022 18:21:05 GMT, Joe Wang wrote: > 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. Marked as reviewed by lancea (Reviewer). - PR: https://git.openjdk.java.net/jdk/pull/7945
RFR: 8273370: Preferences.exportSubtree() generates invalid XML if value contains control char
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=7945=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