-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improved type handling #1753
base: main
Are you sure you want to change the base?
Improved type handling #1753
Commits on Jul 26, 2020
-
Configuration menu - View commit details
-
Copy full SHA for f8b33f4 - Browse repository at this point
Copy the full SHA f8b33f4View commit details -
Remove WildcardType check in getCollectionElementType
The returned Type is never a wildcard due to the changes made to getSupertype by commit b1fb9ca.
Configuration menu - View commit details
-
Copy full SHA for 9faa6c3 - Browse repository at this point
Copy the full SHA 9faa6c3View commit details -
Remove redundant getRawType call from MapTypeAdapterFactory
getRawType(TypeToken.getType()) is the same as calling TypeToken.getRawType().
Configuration menu - View commit details
-
Copy full SHA for 074ec48 - Browse repository at this point
Copy the full SHA 074ec48View commit details
Commits on Jul 29, 2020
-
Configuration menu - View commit details
-
Copy full SHA for a264348 - Browse repository at this point
Copy the full SHA a264348View commit details -
Remove incorrect statement about TypeToken wildcards
It is possible to use wildcards as part of the type argument, e.g.: `new TypeToken<List<? extends CharSequence>>() {}`
Configuration menu - View commit details
-
Copy full SHA for 0e69593 - Browse repository at this point
Copy the full SHA 0e69593View commit details -
Only allow direct subclasses of TypeToken
Previously subclasses of subclasses (...) of TypeToken were allowed which can behave incorrectly when retrieving the type argument, e.g.: class SubTypeToken<T> extends TypeToken<Integer> {} new SubTypeToken<String>() {}.getType() This returned `String` despite the class extending TypeToken<Integer>.
Configuration menu - View commit details
-
Copy full SHA for 02b7500 - Browse repository at this point
Copy the full SHA 02b7500View commit details
Commits on Jul 30, 2020
-
Throw exception when TypeToken captures type variable
Due to type erasure the runtime type argument for a type variable is not available. Therefore there is no point in capturing a type variable and it might even give a false sense of type-safety.
Configuration menu - View commit details
-
Copy full SHA for 85159c4 - Browse repository at this point
Copy the full SHA 85159c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 11c1d05 - Browse repository at this point
Copy the full SHA 11c1d05View commit details -
Rename $Gson$Types.getGenericSupertype parameter
Rename the method parameter to match the documentation of the method and to be similar to getSupertype(...).
Configuration menu - View commit details
-
Copy full SHA for f853dbb - Browse repository at this point
Copy the full SHA f853dbbView commit details