imbajin commented on code in PR #776:
URL: 
https://github.com/apache/hugegraph-toolchain/pull/776#discussion_r4184554268


##########
hugegraph-client/src/main/java/org/apache/hugegraph/api/graphs/GraphsAPI.java:
##########
@@ -86,6 +99,43 @@ public Map<String, String> create(String name, String 
cloneGraphName, String con
         return result.readObject(Map.class);
     }
 
+    private static String legacyGraphConfig(String configText) {
+        Map<?, ?> config = JsonUtil.fromJson(configText, Map.class);
+        Properties properties = new Properties();
+        config.forEach((key, value) -> {
+            E.checkArgument(value instanceof String || value instanceof Number 
||
+                            value instanceof Boolean,
+                            "Legacy graph config option '%s' must be a scalar 
value", key);
+            properties.setProperty(key.toString(), value.toString());
+        });
+        StringWriter text = new StringWriter();
+        try {
+            properties.store(text, null);

Review Comment:
   Fixed in c5a5d6be on the shared source branch (org PR #41). The existing 
legacy conversion now escapes non-ASCII UTF-16 code units as Unicode sequences, 
including both surrogate halves, so its request body is ASCII-only. The 
regression asserts ASCII encoding and checks Chinese, accented characters, 
emoji, whitespace, and literal escapes after UTF-8, Windows-1252, and GBK byte 
encoding followed by UTF-8 decoding through Commons Configuration 2.8.0. Native 
Java 17 GraphsAPITest passed all 10 tests; independent final diff review found 
no actionable defects. This validates the conversion/parser boundary, without 
claiming a new Server or MySQL integration run.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to