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

Nate McCall edited comment on CASSANDRA-14260 at 3/20/18 11:32 PM:
-------------------------------------------------------------------

-Nit on the {{equals()}} and {{hashCode()}} impls - those would be cleaner 
using {{Objects.equals}} and {{Objects.hash}} (JDK version).- We use these in a 
lot of other places in the code already and would be nice to keep new 
contributions in line with such. 

Update: [~jjirsa] just pointed out that Objects autoboxes with primitives which 
was news to me and sort of makes sense when i think about it. 


was (Author: zznate):
Nit on the {{equals()}} and {{hashCode()}} impls - those would be cleaner using 
{{Objects.equals}} and {{Objects.hash}} (JDK version). We use these in a lot of 
other places in the code already and would be nice to keep new contributions in 
line with such. 

> Refactor pair to avoid boxing longs/ints
> ----------------------------------------
>
>                 Key: CASSANDRA-14260
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14260
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jeff Jirsa
>            Assignee: Jeff Jirsa
>            Priority: Minor
>             Fix For: 4.x
>
>
> We uses Pair<X,Y> all over the place, and in many cases either/both of X and 
> Y are primitives (ints, longs), and we end up boxing them into Integers and 
> Longs. We should have specialized versions that take primitives. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to