hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiroshi Ikeda (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HADOOP-10275) Serialization should remove its type parameter
Date Fri, 24 Jan 2014 08:55:37 GMT
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)

Mime
View raw message