diff --git a/source/net/yacy/document/geolocalization/Localization.java b/source/net/yacy/document/geolocalization/Localization.java index 9ac8aa0b1..d9076980b 100644 --- a/source/net/yacy/document/geolocalization/Localization.java +++ b/source/net/yacy/document/geolocalization/Localization.java @@ -54,7 +54,7 @@ public interface Localization { 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 */ public int hashCode(); diff --git a/source/net/yacy/document/geolocalization/Location.java b/source/net/yacy/document/geolocalization/Location.java index 4fae94d32..86b15146c 100644 --- a/source/net/yacy/document/geolocalization/Location.java +++ b/source/net/yacy/document/geolocalization/Location.java @@ -47,7 +47,8 @@ public class Location extends Coordinates { public boolean equals(Object loc) { 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()); } }