You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by nk...@apache.org on 2013/11/04 17:59:25 UTC

svn commit: r1538678 - /hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerName.java

Author: nkeywal
Date: Mon Nov  4 16:59:25 2013
New Revision: 1538678

URL: http://svn.apache.org/r1538678
Log:
HBASE-9886 Optimize ServerName#compareTo

Modified:
    hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerName.java

Modified: hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerName.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerName.java?rev=1538678&r1=1538677&r2=1538678&view=diff
==============================================================================
--- hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerName.java (original)
+++ hbase/branches/0.96/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerName.java Mon Nov  4 16:59:25 2013
@@ -253,8 +253,7 @@ public class ServerName implements Compa
 
   @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;