even more default capacities

This commit is contained in:
Ceikry 2021-03-12 21:23:46 -06:00
parent 78a9b8c88e
commit 19e20d9dc9
109 changed files with 144 additions and 144 deletions

View file

@ -45,7 +45,7 @@ public class IoSession {
/**
* The currently queued writing data.
*/
private List<ByteBuffer> writingQueue = new ArrayList<>();
private List<ByteBuffer> writingQueue = new ArrayList<>(20);
/**
* The currently queued reading data.

View file

@ -38,7 +38,7 @@ public final class CommunicationInfo {
/**
* The list of blocked players.
*/
private final List<String> blocked = new ArrayList<>();
private final List<String> blocked = new ArrayList<>(20);
/**
* The player's clan name.
@ -105,7 +105,7 @@ public final class CommunicationInfo {
if (privateChatSetting != 2) {
for (GameServer server : WorldDatabase.getWorlds()) {
if (server != null && server.isActive()) {
List<String> names = new ArrayList<>();
List<String> names = new ArrayList<>(20);
for (PlayerSession p : server.getPlayers().values()) {
if (p.isActive() && p.getCommunication().contacts.containsKey(player.getUsername())) {
if (privateChatSetting == 0 || contacts.containsKey(p.getUsername())) {

View file

@ -42,7 +42,7 @@ public final class SQLTable {
* @return The columns.
*/
public List<SQLColumn> getChanged() {
List<SQLColumn> updated = new ArrayList<>();
List<SQLColumn> updated = new ArrayList<>(20);
for (int i = 0; i < columns.length; i++) {
SQLColumn column = columns[i];
if (column.isChanged()) {