HorizonNet commented on a change in pull request #1639:
URL: https://github.com/apache/hbase/pull/1639#discussion_r420196072
##########
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:
Test class is moved to `hbase-common`. Also re-enabled the ignored test
case within it.
----------------------------------------------------------------
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]