hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r515858 - in /lucene/hadoop/trunk: CHANGES.txt src/java/org/apache/hadoop/record/Utils.java
Date Thu, 08 Mar 2007 00:05:06 GMT
Author: cutting
Date: Wed Mar  7 16:05:05 2007
New Revision: 515858

URL: http://svn.apache.org/viewvc?view=rev&rev=515858
Log:
HADOOP-1088.  Fix record serialization of negative values.  Contributed by Milind.

Modified:
    lucene/hadoop/trunk/CHANGES.txt
    lucene/hadoop/trunk/src/java/org/apache/hadoop/record/Utils.java

Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=515858&r1=515857&r2=515858
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Wed Mar  7 16:05:05 2007
@@ -27,6 +27,9 @@
  7. HADOOP-1082.  Fix a NullPointerException in ChecksumFileSystem.
     (Hairong Kuang via cutting)
 
+ 8. HADOOP-1088.  Fix record serialization of negative values.
+    (Milind Bhandarkar via cutting)
+
 
 Release 0.12.0 - 2007-03-02
 

Modified: lucene/hadoop/trunk/src/java/org/apache/hadoop/record/Utils.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/java/org/apache/hadoop/record/Utils.java?view=diff&rev=515858&r1=515857&r2=515858
==============================================================================
--- lucene/hadoop/trunk/src/java/org/apache/hadoop/record/Utils.java (original)
+++ lucene/hadoop/trunk/src/java/org/apache/hadoop/record/Utils.java Wed Mar  7 16:05:05 2007
@@ -196,7 +196,7 @@
     for (int idx = 0; idx < blen; idx++) {
       char c1 = s.charAt(2*idx);
       char c2 = s.charAt(2*idx+1);
-      barr[idx] = Byte.parseByte(""+c1+c2, 16);
+      barr[idx] = (byte)Integer.parseInt(""+c1+c2, 16);
     }
     return new Buffer(barr);
   }
@@ -230,7 +230,7 @@
     for (int idx = 0; idx < blen; idx++) {
       char c1 = s.charAt(2*idx+1);
       char c2 = s.charAt(2*idx+2);
-      barr[idx] = Byte.parseByte(""+c1+c2, 16);
+      barr[idx] = (byte)Integer.parseInt(""+c1+c2, 16);
     }
     return new Buffer(barr);
   }



Mime
View raw message