Repository: hbase Updated Branches: refs/heads/master 7ddf79946 -> ee4f0c506
HBASE-19702 Improve RSGroupInfo constructors Signed-off-by: Chia-Ping Tsai <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/ee4f0c50 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/ee4f0c50 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/ee4f0c50 Branch: refs/heads/master Commit: ee4f0c506ad583578bd76e7919f2264d7485b48d Parents: 7ddf799 Author: Xiang Li <[email protected]> Authored: Tue Jan 9 00:42:52 2018 +0800 Committer: Chia-Ping Tsai <[email protected]> Committed: Tue Jan 9 12:55:14 2018 +0800 ---------------------------------------------------------------------- .../java/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/ee4f0c50/hbase-common/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.java ---------------------------------------------------------------------- diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.java index f87ec71..25e827d 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/rsgroup/RSGroupInfo.java @@ -47,13 +47,12 @@ public class RSGroupInfo { RSGroupInfo(String name, SortedSet<Address> servers, SortedSet<TableName> tables) { this.name = name; - this.servers = servers == null? new TreeSet<>(): servers; - this.servers.addAll(servers); - this.tables = new TreeSet<>(tables); + this.servers = (servers == null) ? new TreeSet<>() : new TreeSet<>(servers); + this.tables = (tables == null) ? new TreeSet<>() : new TreeSet<>(tables); } public RSGroupInfo(RSGroupInfo src) { - this(src.getName(), src.servers, src.tables); + this(src.name, src.servers, src.tables); } /**
