HBASE-18470 Remove the redundant comma from RetriesExhaustedWithDetailsException#getDesc

Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
Benedict Jin 2017-08-03 14:55:23 +08:00 committed by Chia-Ping Tsai
parent 855dd48f0a
commit fe890b70ac
1 changed files with 2 additions and 2 deletions

View File

@ -111,10 +111,10 @@ extends RetriesExhaustedException {
Set<String> uniqAddr = new HashSet<>(); Set<String> uniqAddr = new HashSet<>();
uniqAddr.addAll(hostnamePort); uniqAddr.addAll(hostnamePort);
for(String addr : uniqAddr) { for (String addr : uniqAddr) {
addrs.append(addr).append(", "); addrs.append(addr).append(", ");
} }
return addrs.toString(); return uniqAddr.isEmpty() ? addrs.toString() : addrs.substring(0, addrs.length() - 2);
} }
public String getExhaustiveDescription() { public String getExhaustiveDescription() {