EsotericSoftware/kryo — pull request #146 by eigenvariable (2013-11-12 02:09:46+00:00)
Title: fixed API for read

The current API for the Serializer class reads as follows:

abstract public T read (Kryo kryo, Input input, Class type)

Here, the type of the input called "type" will often be a lie when the serializer is used as a default serializer: rather than being a Class it will be a Class

for some U that extends T (if Java had a notion of covariance, and Class were defined to be covariant in its type argument then this type signature would be just fine). This lie doesn't cause problems at runtime because of the JVM's type-erasure, but the API would be more accurate if it were defined as follows:

abstract public T read (Kryo kryo, Input input, Class

This pull request makes this simple change.