Skip to content

Commit

Permalink
Fix rare ConcurrentModificationException
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCodez committed Feb 17, 2024
1 parent 159eb54 commit 206665a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@

public class VotingPluginBungee extends Plugin implements Listener {

private HashMap<String, ArrayList<OfflineBungeeVote>> cachedOnlineVotes = new HashMap<String, ArrayList<OfflineBungeeVote>>();
private ConcurrentHashMap<String, ArrayList<OfflineBungeeVote>> cachedOnlineVotes = new ConcurrentHashMap<String, ArrayList<OfflineBungeeVote>>();

private HashMap<String, ArrayList<OfflineBungeeVote>> cachedVotes = new HashMap<String, ArrayList<OfflineBungeeVote>>();
private ConcurrentHashMap<String, ArrayList<OfflineBungeeVote>> cachedVotes = new ConcurrentHashMap<String, ArrayList<OfflineBungeeVote>>();

private HashMap<String, ClientHandler> clientHandles;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@
public class VotingPluginVelocity {

private static final ChannelIdentifier CHANNEL = MinecraftChannelIdentifier.create("vp", "vp");
private HashMap<String, ArrayList<OfflineBungeeVote>> cachedOnlineVotes = new HashMap<String, ArrayList<OfflineBungeeVote>>();
private HashMap<RegisteredServer, ArrayList<OfflineBungeeVote>> cachedVotes = new HashMap<RegisteredServer, ArrayList<OfflineBungeeVote>>();
private ConcurrentHashMap<String, ArrayList<OfflineBungeeVote>> cachedOnlineVotes = new ConcurrentHashMap<String, ArrayList<OfflineBungeeVote>>();
private ConcurrentHashMap<RegisteredServer, ArrayList<OfflineBungeeVote>> cachedVotes = new ConcurrentHashMap<RegisteredServer, ArrayList<OfflineBungeeVote>>();

private HashMap<String, ClientHandler> clientHandles;

Expand Down

0 comments on commit 206665a

Please sign in to comment.