This is an automated email from the ASF dual-hosted git repository. vjasani pushed a commit to branch branch-1 in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-1 by this push: new 73d079e HBASE-24620 : Replace String.join with StringBuilder for JDK 7 compatibility 73d079e is described below commit 73d079eb67abdded404e0438eb75d2c4b1264644 Author: Viraj Jasani <vjas...@apache.org> AuthorDate: Tue Dec 22 11:16:35 2020 +0530 HBASE-24620 : Replace String.join with StringBuilder for JDK 7 compatibility --- .../src/main/java/org/apache/hadoop/hbase/chaos/ChaosUtils.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hbase-it/src/main/java/org/apache/hadoop/hbase/chaos/ChaosUtils.java b/hbase-it/src/main/java/org/apache/hadoop/hbase/chaos/ChaosUtils.java index c84ed04..cb6b50a 100644 --- a/hbase-it/src/main/java/org/apache/hadoop/hbase/chaos/ChaosUtils.java +++ b/hbase-it/src/main/java/org/apache/hadoop/hbase/chaos/ChaosUtils.java @@ -40,10 +40,15 @@ public class ChaosUtils { String port = Integer.toString(conf.getInt(HConstants.ZOOKEEPER_CLIENT_PORT, 2181)); String[] serverHosts = conf.getStrings(HConstants.ZOOKEEPER_QUORUM, "localhost"); + StringBuilder sb = new StringBuilder(); for (int i = 0; i < serverHosts.length; i++) { serverHosts[i] = serverHosts[i] + ":" + port; + sb.append(serverHosts[i]); + if (i < serverHosts.length - 1) { + sb.append(","); + } } - return String.join(",", serverHosts); + return sb.toString(); } }