From 6ac9f7d8400851fa3d0a136817e880126de9840b Mon Sep 17 00:00:00 2001 From: YOUNG HO CHA Date: Sat, 12 Sep 2020 13:40:09 +0900 Subject: [PATCH] Suppress unchecked type cast warning --- .../main/java/com/google/gson/internal/bind/TypeAdapters.java | 1 + 1 file changed, 1 insertion(+) diff --git a/gson/src/main/java/com/google/gson/internal/bind/TypeAdapters.java b/gson/src/main/java/com/google/gson/internal/bind/TypeAdapters.java index f44e056a..f504ad3f 100644 --- a/gson/src/main/java/com/google/gson/internal/bind/TypeAdapters.java +++ b/gson/src/main/java/com/google/gson/internal/bind/TypeAdapters.java @@ -782,6 +782,7 @@ public final class TypeAdapters { continue; } field.setAccessible(true); + @SuppressWarnings("unchecked") T constant = (T)(field.get(null)); String name = constant.name(); SerializedName annotation = field.getAnnotation(SerializedName.class);