Skip to content

Commit 614a060

Browse files
committed
Fix an issue when reading Unicode
Contributed by Claude
1 parent 1e0f5e1 commit 614a060

File tree

1 file changed

+4
-4
lines changed
  • independent-projects/bootstrap/json/src/main/java/io/quarkus/bootstrap/json

1 file changed

+4
-4
lines changed

independent-projects/bootstrap/json/src/main/java/io/quarkus/bootstrap/json/JsonReader.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,10 @@ private static int unescape(int ch) {
236236
}
237237

238238
private char readUnicode() {
239-
final char digit1 = Character.forDigit(nextChar(), 16);
240-
final char digit2 = Character.forDigit(nextChar(), 16);
241-
final char digit3 = Character.forDigit(nextChar(), 16);
242-
final char digit4 = Character.forDigit(nextChar(), 16);
239+
final int digit1 = Character.digit(nextChar(), 16);
240+
final int digit2 = Character.digit(nextChar(), 16);
241+
final int digit3 = Character.digit(nextChar(), 16);
242+
final int digit4 = Character.digit(nextChar(), 16);
243243
return (char) (digit1 << 12 | digit2 << 8 | digit3 << 4 | digit4);
244244
}
245245

0 commit comments

Comments
 (0)