[ 
https://issues.apache.org/jira/browse/THRIFT-3898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15422744#comment-15422744
 ] 

Mike Rettig commented on THRIFT-3898:
-------------------------------------

Similarly the F type parameter should be removed. It is also self referential 
so it requires a known type to use. 

A cleaner TBase interface...
public interface TBase extends Serializable {
    void read(TProtocol var1) throws TException;

    void write(TProtocol var1) throws TException;

    TBase deepCopy();

    void clear();
}

> TBase interface shouldn't extend Comparable
> -------------------------------------------
>
>                 Key: THRIFT-3898
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3898
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>    Affects Versions: 0.9.3
>            Reporter: Mike Rettig
>            Priority: Minor
>
> The interface....
> public interface TBase<T extends TBase<?, ?>, F extends TFieldIdEnum> extends 
> Comparable<T>, Serializable {
> ... end interface
> Extending TBase with Comparable<T> forces the inclusion of the T generic 
> parameter that is self referential. It doesn't make sense to need this on the 
> base interface since it isn't possible to compare different TBase types. 
> This only applies to the TBase interface. The generated structs should still 
> implement Comparable. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to