fix for operator precedence bug (cast binds stronger than bitwise AND)

in peer hash hashing. This should not change anything if java casts long
to int by masking with 0xFFFFFFFFL but you never know. The important
thing is, that the hashCode() should not return numbers that have the
same order as the hash code order because hashing of seeds is used to
remove the order in some places.
pull/1/head
Michael Peter Christen 11 years ago
parent 6634b5b737
commit 3dc5fb0050

@ -1204,7 +1204,7 @@ public class Seed implements Cloneable, Comparable<Seed>, Comparator<Seed>
@Override
public int hashCode() {
return (int) (Base64Order.enhancedCoder.cardinal(this.hash) & (Integer.MAX_VALUE));
return (int) ((Base64Order.enhancedCoder.cardinal(this.hash) & (Integer.MAX_VALUE)));
}
@Override

Loading…
Cancel
Save