Repository: hbase
Updated Branches:
  refs/heads/0.98 d15df9773 -> aa60960a3
  refs/heads/branch-1 95da29707 -> 2ef6d03e5
  refs/heads/master a99e19a31 -> 3411f830e


HBASE-11828 callers of SeverName.valueOf should use equals and not ==.

Signed-off-by: Andrew Purtell <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/3411f830
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3411f830
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3411f830

Branch: refs/heads/master
Commit: 3411f830e350702bb94090fe298df27d508036d8
Parents: a99e19a
Author: Sean Busbey <[email protected]>
Authored: Tue Aug 26 11:29:33 2014 -0500
Committer: Andrew Purtell <[email protected]>
Committed: Tue Aug 26 17:52:13 2014 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/ServerName.java     | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/3411f830/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerName.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerName.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerName.java
index acd6ee7..48b4a79 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerName.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ServerName.java
@@ -147,14 +147,29 @@ public class ServerName implements 
Comparable<ServerName>, Serializable {
     return Long.parseLong(serverName.substring(index + 1));
   }
 
+  /**
+   * Retrieve an instance of ServerName.
+   * Callers should use the equals method to compare returned instances, 
though we may return
+   * a shared immutable object as an internal optimization.
+   */
   public static ServerName valueOf(final String hostname, final int port, 
final long startcode) {
     return new ServerName(hostname, port, startcode);
   }
 
+  /**
+   * Retrieve an instance of ServerName.
+   * Callers should use the equals method to compare returned instances, 
though we may return
+   * a shared immutable object as an internal optimization.
+   */
   public static ServerName valueOf(final String serverName) {
     return new ServerName(serverName);
   }
 
+  /**
+   * Retrieve an instance of ServerName.
+   * Callers should use the equals method to compare returned instances, 
though we may return
+   * a shared immutable object as an internal optimization.
+   */
   public static ServerName valueOf(final String hostAndPort, final long 
startCode) {
     return new ServerName(hostAndPort, startCode);
   }

Reply via email to