Skip to content

Commit 290115a

Browse files
committed
fix aarch64 jdk8 error writeU4Hex2
1 parent a8aa4df commit 290115a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/src/main/java/com/alibaba/fastjson2/util/StringUtils.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,10 @@ public static void writeEscapedChar(byte[] bytes, int off, int c0) {
327327
}
328328

329329
public static void writeU4Hex2(byte[] bytes, int off, int c) {
330-
putIntUnaligned(bytes, off, LATIN1.U4);
330+
bytes[off] = '\\';
331+
bytes[off + 1] = 'u';
332+
bytes[off + 2] = (byte) '0';
333+
bytes[off + 3] = (byte) '0';
331334
putShortLE(bytes, off + 4, hex2(c));
332335
}
333336

0 commit comments

Comments
 (0)