HBASE-19702 Improve RSGroupInfo constructors

Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
Xiang Li 2018-01-09 00:42:52 +08:00 committed by Chia-Ping Tsai
parent 7ddf79946d
commit ee4f0c506a
1 changed files with 3 additions and 4 deletions

View File

@ -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);
}
/**