Skip to content

Commit

Permalink
Suppress unchecked type cast warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ganadist committed Sep 12, 2020
1 parent 7dbfce9 commit ddee26e
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,7 @@ public EnumTypeAdapter(Class<T> classOfT) {
continue;
}
field.setAccessible(true);
@SuppressWarnings("unchecked")
T constant = (T)(field.get(null));
String name = constant.name();
SerializedName annotation = field.getAnnotation(SerializedName.class);
Expand Down

0 comments on commit ddee26e

Please sign in to comment.