You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2017/08/09 05:51:18 UTC

[02/27] hbase git commit: HBASE-18470 Remove the redundant comma from RetriesExhaustedWithDetailsException#getDesc

HBASE-18470 Remove the redundant comma from RetriesExhaustedWithDetailsException#getDesc

Signed-off-by: Chia-Ping Tsai <ch...@gmail.com>


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

Branch: refs/heads/HBASE-18467
Commit: fe890b70ace30f35cce947de26a64fb646290219
Parents: 855dd48
Author: Benedict Jin <15...@qq.com>
Authored: Thu Aug 3 14:55:23 2017 +0800
Committer: Chia-Ping Tsai <ch...@gmail.com>
Committed: Thu Aug 3 15:42:53 2017 +0800

----------------------------------------------------------------------
 .../hbase/client/RetriesExhaustedWithDetailsException.java       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/fe890b70/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.java
----------------------------------------------------------------------
diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.java
index 70d5548..e1a6754 100644
--- a/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.java
+++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/client/RetriesExhaustedWithDetailsException.java
@@ -111,10 +111,10 @@ extends RetriesExhaustedException {
     Set<String> uniqAddr = new HashSet<>();
     uniqAddr.addAll(hostnamePort);
 
-    for(String addr : uniqAddr) {
+    for (String addr : uniqAddr) {
       addrs.append(addr).append(", ");
     }
-    return addrs.toString();
+    return uniqAddr.isEmpty() ? addrs.toString() : addrs.substring(0, addrs.length() - 2);
   }
 
   public String getExhaustiveDescription() {