Fix comparisons of objects in case insensitive hashmap

This commit is contained in:
md_5 2013-06-01 16:07:17 +10:00
parent 388d2620db
commit 757f8f0cb9

View File

@ -16,6 +16,6 @@ class CaseInsensitiveHashingStrategy implements HashingStrategy
@Override
public boolean equals(Object o1, Object o2)
{
return o1 instanceof String && o2 instanceof String && ( (String) o1 ).toLowerCase().equals( ( (String) o2 ).toLowerCase() );
return o1.equals( o2 ) || ( o1 instanceof String && o2 instanceof String && ( (String) o1 ).toLowerCase().equals( ( (String) o2 ).toLowerCase() ) );
}
}