From bdb7e1439e5892a90a3ee4716205f929c4c18b17 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Wed, 17 Jun 2026 05:27:57 -0400 Subject: [PATCH] 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. --- .../main/java/com/zb/mom/ww/mxgateway/cli/MxGatewayCli.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clients/java/zb-mom-ww-mxgateway-cli/src/main/java/com/zb/mom/ww/mxgateway/cli/MxGatewayCli.java b/clients/java/zb-mom-ww-mxgateway-cli/src/main/java/com/zb/mom/ww/mxgateway/cli/MxGatewayCli.java index 6a7d88d..44b4483 100644 --- a/clients/java/zb-mom-ww-mxgateway-cli/src/main/java/com/zb/mom/ww/mxgateway/cli/MxGatewayCli.java +++ b/clients/java/zb-mom-ww-mxgateway-cli/src/main/java/com/zb/mom/ww/mxgateway/cli/MxGatewayCli.java @@ -2220,8 +2220,9 @@ public final class MxGatewayCli implements Callable { // 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+0000–U+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);