Return-Path: Delivered-To: apmail-hadoop-avro-commits-archive@minotaur.apache.org Received: (qmail 51033 invoked from network); 21 Oct 2009 18:26:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 21 Oct 2009 18:26:56 -0000 Received: (qmail 58282 invoked by uid 500); 21 Oct 2009 17:38:30 -0000 Delivered-To: apmail-hadoop-avro-commits-archive@hadoop.apache.org Received: (qmail 56541 invoked by uid 500); 21 Oct 2009 17:38:02 -0000 Mailing-List: contact avro-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: avro-dev@hadoop.apache.org Delivered-To: mailing list avro-commits@hadoop.apache.org Received: (qmail 49513 invoked by uid 99); 21 Oct 2009 16:47:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2009 16:47:53 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Oct 2009 16:47:48 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C12CD23888FC; Wed, 21 Oct 2009 16:47:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r828100 - in /hadoop/avro/trunk: CHANGES.txt src/test/java/org/apache/avro/TestReflect.java Date: Wed, 21 Oct 2009 16:47:27 -0000 To: avro-commits@hadoop.apache.org From: cutting@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091021164727.C12CD23888FC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cutting Date: Wed Oct 21 16:47:27 2009 New Revision: 828100 URL: http://svn.apache.org/viewvc?rev=828100&view=rev Log: AVRO-165. Fix an equals implementation in TestReflect. Contributed by Philip Zeyliger. Modified: hadoop/avro/trunk/CHANGES.txt hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java Modified: hadoop/avro/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=828100&r1=828099&r2=828100&view=diff ============================================================================== --- hadoop/avro/trunk/CHANGES.txt (original) +++ hadoop/avro/trunk/CHANGES.txt Wed Oct 21 16:47:27 2009 @@ -30,6 +30,9 @@ AVRO-156. Fix broken links to Wiki in documentation. (Jeff Hammerbacher via cutting) + AVRO-165. Fix an equals implementation in TestReflect. + (Philip Zeyliger via cutting) + Avro 1.2.0 (14 October 2009) INCOMPATIBLE CHANGES Modified: hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java?rev=828100&r1=828099&r2=828100&view=diff ============================================================================== --- hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java (original) +++ hadoop/avro/trunk/src/test/java/org/apache/avro/TestReflect.java Wed Oct 21 16:47:27 2009 @@ -136,13 +136,16 @@ public boolean equals(Object other) { if (other instanceof AnotherSampleRecord) { AnotherSampleRecord o = (AnotherSampleRecord) other; - boolean equals = this.a == o.a; - if (this.s == null && o.s != null) - equals = false; - if (this.s != null && this.s.equals(o.s)) - equals = true; + if ( (this.a == null && o.a != null) || + (this.a != null && !this.a.equals(o.a)) || + (this.s == null && o.s != null) || + (this.s != null && !this.s.equals(o.s)) ) { + return false; + } + return true; + } else { + return false; } - return true; } } }