git-svn-id: https://svn.apache.org/repos/asf/hadoop/hdfs/trunk@812080 13f79535-47bb-0310-9956-ffa450edef68
@@ -128,6 +128,9 @@ Trunk (unreleased changes)
HDFS-551. Create new functional test for a block report. (Konstantin
Boudnik via hairong)
+ HDFS-288. Redundant computation in hashCode() implementation.
+ (szetszwo via tomwhite)
+
BUG FIXES
HDFS-76. Better error message to users when commands fail because of
@@ -207,6 +207,6 @@ public class Block implements Writable, Comparable<Block> {
/** {@inheritDoc} */
public int hashCode() {
//GenerationStamp is IRRELEVANT and should not be used here
- return 37 * 17 + (int) (blockId^(blockId>>>32));
+ return (int)(blockId^(blockId>>>32));
}
@@ -109,6 +109,6 @@ public class GenerationStamp implements WritableComparable<GenerationStamp> {
- return 37 * 17 + (int) (genstamp^(genstamp>>>32));
+ return (int) (genstamp^(genstamp>>>32));
@@ -113,7 +113,7 @@ public class DirectoryScanner {
@Override // Object
public long getGenStamp() {