Skip to content

Commit

Permalink
Use ArrayDeque
Browse files Browse the repository at this point in the history
  • Loading branch information
BoomEaro committed Nov 10, 2024
1 parent 79ba9c0 commit 68fa706
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions proxy/src/main/java/net/md_5/bungee/ServerConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.util.ArrayDeque;
import java.util.LinkedList;
import java.util.Queue;
import lombok.Data;
import lombok.Getter;
Expand Down Expand Up @@ -32,7 +31,7 @@ public class ServerConnection implements Server
private final boolean forgeServer = false;
@Getter
private final Queue<KeepAliveData> keepAlives = new ArrayDeque<>();
private final Queue<DefinedPacket> packetQueue = new LinkedList<>();
private final Queue<DefinedPacket> packetQueue = new ArrayDeque<>();

private final Unsafe unsafe = new Unsafe()
{
Expand Down
3 changes: 2 additions & 1 deletion proxy/src/main/java/net/md_5/bungee/UserConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import io.netty.util.internal.PlatformDependent;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.util.ArrayDeque;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
Expand Down Expand Up @@ -145,7 +146,7 @@ public final class UserConnection implements ProxiedPlayer
@Setter
private ForgeServerHandler forgeServerHandler;
/*========================================================================*/
private final Queue<DefinedPacket> packetQueue = new LinkedList<>();
private final Queue<DefinedPacket> packetQueue = new ArrayDeque<>();
private final Unsafe unsafe = new Unsafe()
{
@Override
Expand Down

0 comments on commit 68fa706

Please sign in to comment.