Skip to content

Commit 90bf947

Browse files
committed
...
1 parent ef5d673 commit 90bf947

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main/java/com/fasterxml/jackson/core/json/UTF8JsonGenerator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,7 @@ private final void _writeStringSegment2(final char[] cbuf, int offset, final int
15121512
outputBuffer[outputPtr++] = (byte) (0x80 | (ch & 0x3f));
15131513
} else {
15141514
// 3- or 4-byte character
1515-
if (_isSurrogateChar((char) ch)) {
1515+
if (_isSurrogateChar(ch)) {
15161516
final boolean combineSurrogates = Feature.COMBINE_UNICODE_SURROGATES_IN_UTF8.enabledIn(_features);
15171517
if (combineSurrogates && offset < end) {
15181518
char highSurrogate = (char) ch;
@@ -1560,7 +1560,7 @@ private final void _writeStringSegment2(final String text, int offset, final int
15601560
outputBuffer[outputPtr++] = (byte) (0x80 | (ch & 0x3f));
15611561
} else {
15621562
// 3- or 4-byte character
1563-
if (_isSurrogateChar((char) ch)) {
1563+
if (_isSurrogateChar(ch)) {
15641564
final boolean combineSurrogates = Feature.COMBINE_UNICODE_SURROGATES_IN_UTF8.enabledIn(_features);
15651565
if (combineSurrogates && offset < end) {
15661566
char highSurrogate = (char) ch;
@@ -2244,7 +2244,7 @@ private byte[] getHexBytes() {
22442244
}
22452245

22462246
// @since 2.18
2247-
private boolean _isSurrogateChar(char ch) {
2247+
private boolean _isSurrogateChar(int ch) {
22482248
return (ch & 0xD800) == 0xD800;
22492249
}
22502250
}

0 commit comments

Comments
 (0)