@@ -3240,13 +3240,8 @@ protected final String toString(Map object) {
3240
3240
}
3241
3241
3242
3242
public static JSONReader of (byte [] utf8Bytes ) {
3243
- boolean ascii = false ;
3244
- if (PREDICATE_IS_ASCII != null ) {
3245
- ascii = PREDICATE_IS_ASCII .test (utf8Bytes );
3246
- }
3247
-
3248
3243
Context context = createReadContext ();
3249
- if (ascii ) {
3244
+ if (PREDICATE_IS_ASCII . test ( utf8Bytes ) ) {
3250
3245
return new JSONReaderASCII (context , null , utf8Bytes , 0 , utf8Bytes .length );
3251
3246
}
3252
3247
@@ -3255,25 +3250,15 @@ public static JSONReader of(byte[] utf8Bytes) {
3255
3250
3256
3251
@ Deprecated
3257
3252
public static JSONReader of (Context context , byte [] utf8Bytes ) {
3258
- boolean ascii = false ;
3259
- if (PREDICATE_IS_ASCII != null ) {
3260
- ascii = PREDICATE_IS_ASCII .test (utf8Bytes );
3261
- }
3262
-
3263
- if (ascii ) {
3253
+ if (PREDICATE_IS_ASCII .test (utf8Bytes )) {
3264
3254
return new JSONReaderASCII (context , null , utf8Bytes , 0 , utf8Bytes .length );
3265
3255
}
3266
3256
3267
3257
return new JSONReaderUTF8 (context , null , utf8Bytes , 0 , utf8Bytes .length );
3268
3258
}
3269
3259
3270
3260
public static JSONReader of (byte [] utf8Bytes , Context context ) {
3271
- boolean ascii = false ;
3272
- if (PREDICATE_IS_ASCII != null ) {
3273
- ascii = PREDICATE_IS_ASCII .test (utf8Bytes );
3274
- }
3275
-
3276
- if (ascii ) {
3261
+ if (PREDICATE_IS_ASCII .test (utf8Bytes )) {
3277
3262
return new JSONReaderASCII (context , null , utf8Bytes , 0 , utf8Bytes .length );
3278
3263
}
3279
3264
@@ -3510,7 +3495,7 @@ public static JSONReader of(String str) {
3510
3495
}
3511
3496
3512
3497
Context context = JSONFactory .createReadContext ();
3513
- if (STRING_VALUE != null && STRING_CODER != null && PREDICATE_IS_ASCII != null ) {
3498
+ if (STRING_VALUE != null && STRING_CODER != null ) {
3514
3499
try {
3515
3500
final int LATIN1 = 0 ;
3516
3501
int coder = STRING_CODER .applyAsInt (str );
0 commit comments