Closed jakekdodd closed 6 years ago
Was going to put this on the constructor, but with the lazy initialization it belongs on the adapter's read and write methods.
read
write
Suppresses unchecked warnings for assignment to any TypeAdapter<T> where T itself is a generic type:
TypeAdapter<T>
T
set__string_adapter = (TypeAdapter<Set<String>>) gson.getAdapter(TypeToken.getParameterized(Set.class, String.class));
Was going to put this on the constructor, but with the lazy initialization it belongs on the adapter's
read
andwrite
methods.Suppresses unchecked warnings for assignment to any
TypeAdapter<T>
whereT
itself is a generic type: