-
-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Milestone
Description
The most common use of GenericType, as explained even in its own Javadocs, is:
new GenericType<List<Integer>>() { }However, for reasons I don't understand, GenericType implements Serializable. This means that in ever single usage like the above, I will need to suppress a warning related to the lack of a serialVersionUID.
- The original example in Neil Gafter's famous Super Type Tokens does not implement
Serializable. - Jackson's
TypeReferencedoes not implementSerializable. - Spring's
ParameterizedTypeReferencedoes not implementSerializable. - The Guice
TypeLiteraldoes not implementSerializable. - The GeantyRef fork of gentyref has a
TypeTokenwhich does not implementSerializable. - Guava's
TypeTokenunfortunately does implementSerializable, so at least ClassMate is not alone on this.
So only ClassMate and Guava implement Serializable for the class with identical functionality. The rest don't. It's not clear to me how it would ever be useful.
Can we remove implements Serializable from ClassMate GenericType<T>? No one needs or even wants Serializable in 2023. There are few if any cases that anyone should be creating new code using Serializable, and here it just brings a headache.
Metadata
Metadata
Assignees
Labels
No labels