Return-Path: X-Original-To: apmail-avro-dev-archive@www.apache.org Delivered-To: apmail-avro-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F0A21D04C for ; Mon, 6 Aug 2012 18:38:05 +0000 (UTC) Received: (qmail 55220 invoked by uid 500); 6 Aug 2012 18:38:04 -0000 Delivered-To: apmail-avro-dev-archive@avro.apache.org Received: (qmail 54558 invoked by uid 500); 6 Aug 2012 18:38:03 -0000 Mailing-List: contact dev-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list dev@avro.apache.org Received: (qmail 53927 invoked by uid 99); 6 Aug 2012 18:38:03 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Aug 2012 18:38:03 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 0989A142855 for ; Mon, 6 Aug 2012 18:38:03 +0000 (UTC) Date: Mon, 6 Aug 2012 18:38:03 +0000 (UTC) From: "Doug Cutting (JIRA)" To: dev@avro.apache.org Message-ID: <540572833.17766.1344278283041.JavaMail.jiratomcat@issues-vm> In-Reply-To: <2100485132.15226.1344206763040.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (AVRO-1136) Pair.equals returns false positives 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/AVRO-1136?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13429331#comment-13429331 ] Doug Cutting commented on AVRO-1136: ------------------------------------ This is by design. Pair is intended for key/value pairs that are ordered by key only. Perhaps we should make this clearer in the documentation? > Pair.equals returns false positives > ----------------------------------- > > Key: AVRO-1136 > URL: https://issues.apache.org/jira/browse/AVRO-1136 > Project: Avro > Issue Type: Bug > Components: java > Affects Versions: 1.6.1 > Reporter: Jeremy Lewi > Priority: Minor > > Here is a test that fails and indicates the bug. pair1.equals(pair2) should return false because the values aren't the same but it returns true causing the test to fail. This appears to be a bug in both 1.6.1 and 1.7.1. > package contrail.avro; > import static org.junit.Assert.*; > import org.apache.avro.mapred.Pair; > import org.junit.Test; > public class TestAssertEquals { > @Test > public void test() { > Pair pair1 = new Pair(1, 2); > Pair pair2 = new Pair(1, 1); > assertFalse(pair1.equals(pair2)); > } > } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira