Return-Path: X-Original-To: apmail-accumulo-notifications-archive@minotaur.apache.org Delivered-To: apmail-accumulo-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F396DF747 for ; Sun, 5 May 2013 23:34:15 +0000 (UTC) Received: (qmail 81215 invoked by uid 500); 5 May 2013 23:34:15 -0000 Delivered-To: apmail-accumulo-notifications-archive@accumulo.apache.org Received: (qmail 81194 invoked by uid 500); 5 May 2013 23:34:15 -0000 Mailing-List: contact notifications-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jira@apache.org Delivered-To: mailing list notifications@accumulo.apache.org Received: (qmail 81179 invoked by uid 99); 5 May 2013 23:34:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 May 2013 23:34:15 +0000 Date: Sun, 5 May 2013 23:34:15 +0000 (UTC) From: "Josh Elser (JIRA)" To: notifications@accumulo.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ACCUMULO-1382) Pair incorrectly assumes its components are Comparable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/ACCUMULO-1382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13649462#comment-13649462 ] Josh Elser commented on ACCUMULO-1382: -------------------------------------- I did notice this when I was applying the patch, started down the path of Java-type-suck-iness, and just said screw it. I should've made a note then. Thanks for doing so. > Pair incorrectly assumes its components are Comparable > ------------------------------------------------------ > > Key: ACCUMULO-1382 > URL: https://issues.apache.org/jira/browse/ACCUMULO-1382 > Project: Accumulo > Issue Type: Bug > Reporter: Christopher Tubbs > Labels: warning > Fix For: 1.6.0 > > > In trunk (for 1.6.0), Pair 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 to Pair,B extends Comparable>), 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: http://www.atlassian.com/software/jira