HBASE-676 Bytes.getInt returns a long

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@666260 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-06-10 18:29:48 +00:00
parent c32f6e31bd
commit a6457d7c04
2 changed files with 4 additions and 3 deletions

View File

@ -46,6 +46,7 @@ Hbase Change Log
HBASE-665 Server side scanner doesn't honor stop row
HBASE-662 UI in table.jsp gives META locations, not the table's regions
location (Jean-Daniel Cryans via Stack)
HBASE-676 Bytes.getInt returns a long (Clint Morgan via Stack)
IMPROVEMENTS
HBASE-559 MR example job to count table rows

View File

@ -133,9 +133,9 @@ public class Bytes {
* @param bytes
* @return the long value
*/
public static long toInt(byte[] bytes) {
public static int toInt(byte[] bytes) {
if (bytes == null || bytes.length == 0) {
return -1L;
return -1;
}
return ByteBuffer.wrap(bytes).getInt();
}