diff --git a/core-parent/core/src/main/java/com/alibaba/fastjson/serializer/EasyjCollectionCodec.java b/core-parent/core/src/main/java/com/alibaba/fastjson/serializer/EasyjCollectionCodec.java index c5339bb6..180a4856 100644 --- a/core-parent/core/src/main/java/com/alibaba/fastjson/serializer/EasyjCollectionCodec.java +++ b/core-parent/core/src/main/java/com/alibaba/fastjson/serializer/EasyjCollectionCodec.java @@ -79,7 +79,7 @@ public void write(JSONSerializer serializer, Object object, Object fieldName, Ty Class clazz = item.getClass(); if (clazz == Integer.class) { - out.writeInt(((Integer)item).intValue()); + out.writeInt((Integer)item); continue; } @@ -108,7 +108,7 @@ public void write(JSONSerializer serializer, Object object, Object fieldName, Ty } } - @SuppressWarnings({"unchecked", "rawtypes"}) + @SuppressWarnings({"unchecked"}) @Override public T deserialze(DefaultJSONParser parser, Type type, Object fieldName) { if (parser.lexer.token() == JSONToken.NULL) { @@ -122,7 +122,7 @@ public T deserialze(DefaultJSONParser parser, Type type, Object fieldName) { return (T)array; } - Collection list = TypeUtils.createCollection(type); + Collection list = TypeUtils.createCollection(type); Type itemType = TypeUtils.getCollectionItemType(type); parser.parseArray(itemType, list, fieldName); diff --git a/core-parent/core/src/main/java/icu/easyj/core/enums/DateFormatType.java b/core-parent/core/src/main/java/icu/easyj/core/enums/DateFormatType.java index abf98ce1..a94a2820 100644 --- a/core-parent/core/src/main/java/icu/easyj/core/enums/DateFormatType.java +++ b/core-parent/core/src/main/java/icu/easyj/core/enums/DateFormatType.java @@ -22,7 +22,6 @@ * * @author wangliang181230 */ -@SuppressWarnings("all") public enum DateFormatType { MM(DateFormatConstants.MM), // 精确到月,长度:7 diff --git a/core-parent/core/src/main/java/icu/easyj/core/json/JSONUtils.java b/core-parent/core/src/main/java/icu/easyj/core/json/JSONUtils.java index 4b0212cb..01f92d2a 100644 --- a/core-parent/core/src/main/java/icu/easyj/core/json/JSONUtils.java +++ b/core-parent/core/src/main/java/icu/easyj/core/json/JSONUtils.java @@ -201,7 +201,6 @@ public static Map toMap3(String text, @NonNull Class keyValueCl * @throws JSONParseException JSON解析失败 */ @NonNull - @SuppressWarnings("all") public static String toJSONString(@Nullable Object obj) { if (obj == null) { return "null"; diff --git a/core-parent/core/src/main/java/icu/easyj/core/loader/condition/DependsOnClassValidator.java b/core-parent/core/src/main/java/icu/easyj/core/loader/condition/DependsOnClassValidator.java index 4ddd929e..893bc1fd 100644 --- a/core-parent/core/src/main/java/icu/easyj/core/loader/condition/DependsOnClassValidator.java +++ b/core-parent/core/src/main/java/icu/easyj/core/loader/condition/DependsOnClassValidator.java @@ -41,7 +41,7 @@ public void validate(Class serviceClass, ClassLoader classLoader) throws Serv try { // 在java11及以上版本中,必须访问过一次注解的属性值,才会抛出TypeNotPresentException异常 - @SuppressWarnings("all") + @SuppressWarnings("unused") Class[] dependsOnClasses = dependsOnClass.value(); } catch (ArrayStoreException | TypeNotPresentException e) { if (dependsOnClass.strategy() == ValidateStrategy.ALL) { diff --git a/core-parent/core/src/test/java/icu/easyj/core/util/ReflectionUtilsTest.java b/core-parent/core/src/test/java/icu/easyj/core/util/ReflectionUtilsTest.java index f353dc9d..0af70b4f 100644 --- a/core-parent/core/src/test/java/icu/easyj/core/util/ReflectionUtilsTest.java +++ b/core-parent/core/src/test/java/icu/easyj/core/util/ReflectionUtilsTest.java @@ -40,7 +40,7 @@ */ public class ReflectionUtilsTest { - @SuppressWarnings("all") + @SuppressWarnings("unused") private static final String STRING = "d"; //Prevent jvm from optimizing final diff --git a/core-parent/core/src/test/java/icu/easyj/core/util/StringUtilsTest.java b/core-parent/core/src/test/java/icu/easyj/core/util/StringUtilsTest.java index 2777ec59..432f8d0a 100644 --- a/core-parent/core/src/test/java/icu/easyj/core/util/StringUtilsTest.java +++ b/core-parent/core/src/test/java/icu/easyj/core/util/StringUtilsTest.java @@ -396,7 +396,7 @@ interface TestInterface { void test(); } - abstract class TestAbstractClass { + abstract static class TestAbstractClass { abstract void test(); }