You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Hiroshi Ikeda (JIRA)" <ji...@apache.org> on 2014/01/24 09:55:37 UTC

[jira] [Created] (HADOOP-10275) Serialization should remove its type parameter

Hiroshi Ikeda created HADOOP-10275:
--------------------------------------

             Summary: Serialization should remove its type parameter
                 Key: HADOOP-10275
                 URL: https://issues.apache.org/jira/browse/HADOOP-10275
             Project: Hadoop Common
          Issue Type: Bug
    Affects Versions: 2.2.0
            Reporter: Hiroshi Ikeda
            Priority: Minor


org.apache.hadoop.io.serializer.Serialization is defined as:
{code}
public interface Serialization<T> {
...
Serializer<T> getSerializer(Class<T> c);
Deserializer<T> getDeserializer(Class<T> c);
}
{code}
but the type parameter <T> is semantically invalid, and type mismatchings in the code are suppressed by explicit cast and annotations.

This interface should be defined as follows:
{code}
public interface Serialization {
...
<T> Serializer<T> getSerializer(Class<T> c);
<T> Deserializer<T> getDeserializer(Class<T> c);
}
{code}




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)