From 757f8f0cb9123d5a8e5d070e884fc7542a66bed8 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 1 Jun 2013 16:07:17 +1000 Subject: [PATCH] Fix comparisons of objects in case insensitive hashmap --- .../net/md_5/bungee/util/CaseInsensitiveHashingStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proxy/src/main/java/net/md_5/bungee/util/CaseInsensitiveHashingStrategy.java b/proxy/src/main/java/net/md_5/bungee/util/CaseInsensitiveHashingStrategy.java index b2ea94e4..e757f7e0 100644 --- a/proxy/src/main/java/net/md_5/bungee/util/CaseInsensitiveHashingStrategy.java +++ b/proxy/src/main/java/net/md_5/bungee/util/CaseInsensitiveHashingStrategy.java @@ -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() ) ); } }