You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove Serializable from internal Type implementation classes. (#3011)
* Remove `Serializable` from internal `Type` implementation classes.
The nested classes `ParameterizedTypeImpl`, `GenericArrayTypeImpl`, and
`WildcardTypeImpl` in `GsonTypes` are implementations of the
corresponding types (without `Impl`) in `java.lang.reflect`. For some
reason, they have always implemented `Serializable`. They are even
documented that way, though the documentation is not published since
`GsonTypes` is an internal implementation class.
The implementations of these interfaces that are returned by
`java.lang.reflect` methods such as `Method.getGenericReturnType()` do
*not* implement `Serializable` so it seems gratuitous for Gson's
implementations to do so. Additionally, `Serializable` classes can
potentially participate in exploits. I think it is highly unlikely that
there is any practical exploit using these classes, but if we can avoid
even having to ask the question then we should.
* Remove unnecessary serialization stuff.
* https://bugs.openjdk.java.net/browse/JDK-8250660. If a lower bound is set, the upper bound must
0 commit comments