HBASE-9886 Optimize ServerName#compareTo

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1538679 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
nkeywal 2013-11-04 16:59:37 +00:00
parent d6bdd54ecc
commit e0a48e6d03
1 changed files with 1 additions and 2 deletions

View File

@ -255,8 +255,7 @@ public class ServerName implements Comparable<ServerName>, Serializable {
@Override
public int compareTo(ServerName other) {
int compare = this.getHostname().toLowerCase().
compareTo(other.getHostname().toLowerCase());
int compare = this.getHostname().compareToIgnoreCase(other.getHostname());
if (compare != 0) return compare;
compare = this.getPort() - other.getPort();
if (compare != 0) return compare;