You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by cu...@apache.org on 2006/08/17 22:45:15 UTC
svn commit: r432385 - in /lucene/hadoop/trunk: CHANGES.txt
src/java/org/apache/hadoop/io/IntWritable.java
Author: cutting
Date: Thu Aug 17 13:45:15 2006
New Revision: 432385
URL: http://svn.apache.org/viewvc?rev=432385&view=rev
Log:
HADOOP-176. Fix a bug in IntWritable.Comparator. Contributed by Dick King.
Modified:
lucene/hadoop/trunk/CHANGES.txt
lucene/hadoop/trunk/src/java/org/apache/hadoop/io/IntWritable.java
Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?rev=432385&r1=432384&r2=432385&view=diff
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Thu Aug 17 13:45:15 2006
@@ -51,6 +51,9 @@
the jobs it depends on have successfully completed.
(Runping Qi via cutting)
+12. HADOOP-176. Fix a bug in IntWritable.Comparator.
+ (Dick King via cutting)
+
Release 0.5.0 - 2006-08-04
Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/io/IntWritable.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/io/IntWritable.java?rev=432385&r1=432384&r2=432385&view=diff
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/io/IntWritable.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/io/IntWritable.java Thu Aug 17 13:45:15 2006
@@ -56,7 +56,7 @@
public int compareTo(Object o) {
int thisValue = this.value;
int thatValue = ((IntWritable)o).value;
- return thisValue - thatValue;
+ return (thisValue<thatValue ? -1 : (thisValue==thatValue ? 0 : 1));
}
public String toString() {
@@ -73,7 +73,7 @@
byte[] b2, int s2, int l2) {
int thisValue = readInt(b1, s1);
int thatValue = readInt(b2, s2);
- return thisValue - thatValue;
+ return (thisValue<thatValue ? -1 : (thisValue==thatValue ? 0 : 1));
}
}