fix(client-java): repair illegal unicode escape in jsonString comment

The Client.Java-041 escaping fix left a literal \u00XX in a // comment; Java
processes \u unicode escapes even in comments, so it failed to compile on
windev (MxGatewayCli.java:2223 illegal unicode escape). Reworded the comment to
plain ASCII. The escaping code itself (String.format with the doubled-backslash
format string) was already correct.
This commit is contained in:
Joseph Doherty
2026-06-17 05:27:57 -04:00
parent 8df0479b99
commit bdb7e1439e
@@ -2220,8 +2220,9 @@ public final class MxGatewayCli implements Callable<Integer> {
// Package-private for the Client.Java-041 escaping regression test.
static String jsonString(String value) {
// RFC 8259 requires the two-character escapes for the named control
// characters and \u00XX escapes for the remaining U+0000U+001F (and
// U+007F) range. The old implementation escaped only \\ \" \r \n, so a
// characters and six-character uXXXX escapes for the remaining
// U+0000-U+001F (and U+007F) range. The old implementation escaped only
// backslash, quote, CR, and LF, so a
// value containing a tab, backspace, form-feed, or any other control
// character produced malformed JSON (Client.Java-041).
StringBuilder builder = new StringBuilder(value.length() + 2);