Skip to content

Commit

Permalink
小调整
Browse files Browse the repository at this point in the history
  • Loading branch information
wangliang181230 committed Dec 4, 2024
1 parent c1c0e1c commit 64eda17
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -108,7 +108,7 @@ public void write(JSONSerializer serializer, Object object, Object fieldName, Ty
}
}

@SuppressWarnings({"unchecked", "rawtypes"})
@SuppressWarnings({"unchecked"})
@Override
public <T> T deserialze(DefaultJSONParser parser, Type type, Object fieldName) {
if (parser.lexer.token() == JSONToken.NULL) {
Expand All @@ -122,7 +122,7 @@ public <T> 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
*
* @author wangliang181230
*/
@SuppressWarnings("all")
public enum DateFormatType {

MM(DateFormatConstants.MM), // 精确到月,长度:7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ public static <KV> Map<KV, KV> toMap3(String text, @NonNull Class<KV> keyValueCl
* @throws JSONParseException JSON解析失败
*/
@NonNull
@SuppressWarnings("all")
public static String toJSONString(@Nullable Object obj) {
if (obj == null) {
return "null";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
*/
public class ReflectionUtilsTest {

@SuppressWarnings("all")
@SuppressWarnings("unused")
private static final String STRING = "d";

//Prevent jvm from optimizing final
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ interface TestInterface {
void test();
}

abstract class TestAbstractClass {
abstract static class TestAbstractClass {
abstract void test();
}

Expand Down

0 comments on commit 64eda17

Please sign in to comment.