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

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

     [ https://issues.apache.org/jira/browse/HADOOP-10275?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hiroshi Ikeda updated HADOOP-10275:
-----------------------------------

    Attachment: HADOOP-10275.patch

Added a patch for 2.2.0

> 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
>         Attachments: HADOOP-10275.patch
>
>
> 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)