Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
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.
Michael Peter Christen3dc5fb00506a
diff --git a/source/net/yacy/peers/Seed.java b/source/net/yacy/peers/Seed.javaindex 44f43b4f7..5581dd65b 100644--- a/source/net/yacy/peers/Seed.java+++ b/source/net/yacy/peers/Seed.java@@ -1204,7 +1204,7 @@ public class Seed implements Cloneable, Comparable<Seed>, Comparator<Seed>@Overridepublic int hashCode() {- return (int) (Base64Order.enhancedCoder.cardinal(this.hash) & (Integer.MAX_VALUE));+ return (int) ((Base64Order.enhancedCoder.cardinal(this.hash) & (Integer.MAX_VALUE)));}@Override