HBASE-19131 (Addendum) Use the emptyList() to replace EMPTY_LIST

This commit is contained in:
Chia-Ping Tsai 2017-11-07 04:06:00 +08:00
parent 9ee8e2714d
commit 33ede55164
1 changed files with 3 additions and 3 deletions

View File

@ -138,7 +138,7 @@ public class ClusterStatus {
*/ */
public List<ServerName> getDeadServerNames() { public List<ServerName> getDeadServerNames() {
if (deadServers == null) { if (deadServers == null) {
return Collections.EMPTY_LIST; return Collections.emptyList();
} }
return Collections.unmodifiableList(deadServers); return Collections.unmodifiableList(deadServers);
} }
@ -256,7 +256,7 @@ public class ClusterStatus {
public Collection<ServerName> getServers() { public Collection<ServerName> getServers() {
if (liveServers == null) { if (liveServers == null) {
return Collections.EMPTY_LIST; return Collections.emptyList();
} }
return Collections.unmodifiableCollection(this.liveServers.keySet()); return Collections.unmodifiableCollection(this.liveServers.keySet());
} }
@ -281,7 +281,7 @@ public class ClusterStatus {
*/ */
public List<ServerName> getBackupMasters() { public List<ServerName> getBackupMasters() {
if (backupMasters == null) { if (backupMasters == null) {
return Collections.EMPTY_LIST; return Collections.emptyList();
} }
return Collections.unmodifiableList(this.backupMasters); return Collections.unmodifiableList(this.backupMasters);
} }