HBASE-20737 put collection into ArrayList instead of addAll function
Signed-off-by: Chia-Ping Tsai <chia7712@gmail.com>
This commit is contained in:
parent
30772eef5d
commit
0e43abc78a
|
@ -187,8 +187,7 @@ public class ClusterStatusPublisher extends ScheduledChore {
|
|||
}
|
||||
|
||||
// We're sending the new deads first.
|
||||
List<Map.Entry<ServerName, Integer>> entries = new ArrayList<>();
|
||||
entries.addAll(lastSent.entrySet());
|
||||
List<Map.Entry<ServerName, Integer>> entries = new ArrayList<>(lastSent.entrySet());
|
||||
Collections.sort(entries, new Comparator<Map.Entry<ServerName, Integer>>() {
|
||||
@Override
|
||||
public int compare(Map.Entry<ServerName, Integer> o1, Map.Entry<ServerName, Integer> o2) {
|
||||
|
|
Loading…
Reference in New Issue