fix for bad location double check

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6884 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
orbiter 2010-05-18 11:54:30 +00:00
parent b7556893c6
commit bd0a9df895
2 changed files with 3 additions and 2 deletions

View File

@ -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();

View File

@ -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());
}
}