On Mon, 24 Aug 2026 19:55:21 GMT, ExE Boss <[email protected]> wrote: >> Naoto Sato has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 768 commits: >> >> - Merge remote-tracking branch 'jdk-sandbox/json' into >> JDK-8381976-Implementation-for-Simple-JSON-API >> - Use explicit ASCII range for printing erroneous escapes >> - Merge branch 'master' into json >> - JPE wording simplification >> - Remove outdated comment regarding Utils.escape >> - Merge branch 'master' into JDK-8381976-Implementation-for-Simple-JSON-API >> - Merge remote-tracking branch 'jdk-sandbox/json' into >> JDK-8381976-Implementation-for-Simple-JSON-API >> - Print ASCII non-control characters as is in error messages >> - Merge remote-tracking branch 'jdk-sandbox/json' into >> JDK-8381976-Implementation-for-Simple-JSON-API >> - JSON document -> JSON text >> - ... and 758 more: https://git.openjdk.org/jdk/compare/8158dfe3...762ab876 > > src/jdk.incubator.json/share/classes/jdk/incubator/json/impl/JsonParser.java > line 560: > >> 558: return c >= 0x20 && c <= 0x7E ? >> 559: Character.toString(c) : >> 560: String.format(Locale.ROOT, "\\u%04X", (int)c); > > The reason I suggested `c > 0x20` instead of `c >= 0x20` is that the space > character is invisible. > Suggestion: > > return c > 0x20 && c <= 0x7E ? > Character.toString(c) : > String.format(Locale.ROOT, "\\u%04X", (int) c); > > > or > Suggestion: > > return c >= 0x21 && c <= 0x7E ? > Character.toString(c) : > String.format(Locale.ROOT, "\\u%04X", (int) c);
Good point. Modified ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32282#discussion_r3847266693
