fix for bad location double check

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6884 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent b7556893c6
commit bd0a9df895

@ -54,7 +54,7 @@ public interface Localization {
public String nickname(); public String nickname();
/** /**
* hashCode that must be used to distinuguish localization services in hash sets * hashCode that must be used to distinguish localization services in hash sets
* @return the hash code, may be derived from the nickname * @return the hash code, may be derived from the nickname
*/ */
public int hashCode(); public int hashCode();

@ -47,7 +47,8 @@ public class Location extends Coordinates {
public boolean equals(Object loc) { public boolean equals(Object loc) {
if (!(loc instanceof Location)) return false; if (!(loc instanceof Location)) return false;
return super.equals(loc) && this.name.equals((Location) loc); if (this.name == null || ((Location) loc).name == null) return super.equals(loc);
return super.equals(loc) && this.name.toLowerCase().equals(((Location) loc).name.toLowerCase());
} }
} }

Loading…
Cancel
Save