This commit is contained in:
redkale
2024-09-29 09:59:50 +08:00
parent 090bfb5629
commit b736cbafc6

View File

@@ -373,11 +373,13 @@ public class JsonCharsWriter extends JsonWriter {
writeEscapeLatinString(quote, Utility.latin1ByteArray(str));
return;
}
// byte[] utf16s = Utility.byteUTF16Array(value);
// if (utf16s != null) { // JDK9+
// writeEscapeUTF16String(quote, utf16s);
// return;
// }
if (false) {
byte[] utf16s = Utility.utf16ByteArray(value);
if (utf16s != null) { // JDK9+
writeEscapeUTF16String(quote, utf16s);
return;
}
}
final int len = str.length();
char[] chars = expand(len * 2 + 2);
int curr = count;