accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Corey J. Nolet (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-1382) Pair incorrectly assumes its components are Comparable
Date Mon, 06 May 2013 00:26:15 GMT


Corey J. Nolet commented on ACCUMULO-1382:

Sorry guys, this was totally my fault and I should have caught it while I was merging the
lexicoders from Keith's github repo. Do we need to supply a Pair lexicoder? Maybe we should
leave that one up to the user?
> Pair incorrectly assumes its components are Comparable
> ------------------------------------------------------
>                 Key: ACCUMULO-1382
>                 URL:
>             Project: Accumulo
>          Issue Type: Bug
>            Reporter: Christopher Tubbs
>              Labels: warning
>             Fix For: 1.6.0
> In trunk (for 1.6.0), Pair<A,B> was made Comparable, but makes assumptions that
A and B are Comparable. This should either be checked in its compareTo method explicitly,
or should be enforced in the generic parameters. This assumption is a runtime bug-in-waiting.
> It looks like this was added to support some of the new Lexicoders.
> I did a rough check to see the implications of enforcing the parameters to be Comparable
(changing it from Pair<A,B> to Pair<A extends Comparable<A>,B extends Comparable<B>>),
and it looks like there's a problem because we use this class with generated thrift code,
which are not Comparable objects.
> It might be better to make a ComparablePair that extends Pair, for use in the Lexicoders,
instead of making Pair itself Comparable.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message