Apache9 commented on a change in pull request #1639:
URL: https://github.com/apache/hbase/pull/1639#discussion_r420157637



##########
File path: hbase-common/src/main/java/org/apache/hadoop/hbase/ServerName.java
##########
@@ -366,22 +286,32 @@ public int hashCode() {
 
   @Override
   public boolean equals(Object o) {
-    if (this == o) return true;
-    if (o == null) return false;
-    if (!(o instanceof ServerName)) return false;
+    if (this == o) {
+      return true;
+    }
+    if (o == null) {
+      return false;
+    }
+    if (!(o instanceof ServerName)) {
+      return false;
+    }
     return this.compareTo((ServerName)o) == 0;
   }
 
   /**
-   * @param left
-   * @param right
-   * @return True if <code>other</code> has same hostname and port.
+   * @param left the first server address to compare
+   * @param right the second server address to compare
+   * @return {@code true} if {@code left} and {@code right} have the same 
hostname and port.
    */
   public static boolean isSameAddress(final ServerName left,
                                       final ServerName right) {
     // TODO: Make this left.getAddress().equals(right.getAddress())

Review comment:
       > We have a test case over in TestServerName called 
testHostNameCaseSensitivity, which compares a lower case version to the upper 
case version via isSameAddress. Does this cover your point?
   
   Good.
   
   And +1 on moving and backporting.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to