From 9f9a01760efa8d25066bebb68e7bb31577d6a7e9 Mon Sep 17 00:00:00 2001 From: wenshao Date: Wed, 22 Jan 2025 19:30:36 +0800 Subject: [PATCH] remove unused code --- .../main/java/com/alibaba/fastjson2/util/IOUtils.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/core/src/main/java/com/alibaba/fastjson2/util/IOUtils.java b/core/src/main/java/com/alibaba/fastjson2/util/IOUtils.java index 441802923..e5c49ffdb 100644 --- a/core/src/main/java/com/alibaba/fastjson2/util/IOUtils.java +++ b/core/src/main/java/com/alibaba/fastjson2/util/IOUtils.java @@ -1665,17 +1665,6 @@ public static int indexOfSlashV(byte[] value, int fromIndex, int max) { return indexOfChar0(value, '\\', i, max); } - public static int indexOfChar(byte[] value, int ch, int fromIndex, int max) { - if (INDEX_OF_CHAR_LATIN1 == null) { - return indexOfChar0(value, ch, fromIndex, max); - } - try { - return (int) INDEX_OF_CHAR_LATIN1.invokeExact(value, ch, fromIndex, max); - } catch (Throwable e) { - throw new JSONException(e.getMessage()); - } - } - private static int indexOfChar0(byte[] value, int ch, int fromIndex, int max) { for (int i = fromIndex; i < max; i++) { if (value[i] == ch) {