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

Branimir Lambov updated CASSANDRA-8171:
---------------------------------------
    Attachment: 8171.patch

As a first step, the attached patch cleans up generics in the dht package. The 
type specification is removed from both IPartitioner and Token, where the 
generic argument effectively specified the token subtype. This never helped 
compile-time type verification as the partitioner, and hence the tokens it 
distributes, only get assigned a concrete type at run time. Also fixes the 
specification of RingPosition and cleans up other generics-related warnings in 
the package.

Fixes over 1000 compilation warnings.

Comparison viewable 
[here|https://github.com/blambov/cassandra/compare/8171-clean-generics].

> Clean up generics
> -----------------
>
>                 Key: CASSANDRA-8171
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8171
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Branimir Lambov
>            Assignee: Branimir Lambov
>            Priority: Minor
>         Attachments: 8171.patch
>
>
> Some uses of generics in the code are causing much more harm than good, and 
> in some cases generic types are used unsafely, hiding potential problems in 
> the code.
> Generics need to be cleaned up to clarify the types, remove unnecessary type 
> specialization when it does not make sense, and significantly reduce the 
> number of unhelpful warnings.



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

Reply via email to