avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r1185367 - in /avro/trunk: CHANGES.txt lang/java/mapred/src/main/java/org/apache/avro/mapred/Pair.java
Date Mon, 17 Oct 2011 20:47:26 GMT
Author: cutting
Date: Mon Oct 17 20:47:25 2011
New Revision: 1185367

URL: http://svn.apache.org/viewvc?rev=1185367&view=rev
Log:
AVRO-927. Java: Fix Pair#equals() to better compare schemas.  Contributed by Brock Noland.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/java/mapred/src/main/java/org/apache/avro/mapred/Pair.java

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1185367&r1=1185366&r2=1185367&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Mon Oct 17 20:47:25 2011
@@ -191,6 +191,9 @@ Avro 1.6.0 (unreleased)
 
     AVRO-933. On latest Ubuntu AvrogencppTests.cc does not compile. (thiru)
 
+    AVRO-927. Java: Fix Pair#equals() to better compare
+    schemas. (Brock Noland via cutting)
+
 Avro 1.5.4 (12 September 2011)
 
   IMPROVEMENTS

Modified: avro/trunk/lang/java/mapred/src/main/java/org/apache/avro/mapred/Pair.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/mapred/src/main/java/org/apache/avro/mapred/Pair.java?rev=1185367&r1=1185366&r2=1185367&view=diff
==============================================================================
--- avro/trunk/lang/java/mapred/src/main/java/org/apache/avro/mapred/Pair.java (original)
+++ avro/trunk/lang/java/mapred/src/main/java/org/apache/avro/mapred/Pair.java Mon Oct 17
20:47:25 2011
@@ -123,7 +123,7 @@ public class Pair<K,V>
     if (o == this) return true;                 // identical object
     if (!(o instanceof Pair)) return false;     // not a pair
     Pair that = (Pair)o;
-    if (this.schema != that.schema)
+    if (!this.schema.equals(that.schema))
       return false;                             // not the same schema
     return this.compareTo(that) == 0;
   }



Mime
View raw message