Skip to content
Snippets Groups Projects
Commit b0c1e9ba authored by Rumen Nikiforov's avatar Rumen Nikiforov
Browse files

BETA: Fixing minor miss-use of `Collections#emptySet` in [10468] it should not...

BETA: Fixing minor miss-use of `Collections#emptySet` in [10468] it should not be used for adding operations because it will throw exceptions since it was not intended for that.
	* Reported by: Zoey76
parent 6484d93c
No related branches found
No related tags found
Loading
...@@ -20,6 +20,7 @@ package gracia.AI.NPC.GeneralDilios; ...@@ -20,6 +20,7 @@ package gracia.AI.NPC.GeneralDilios;
import java.util.Collections; import java.util.Collections;
import java.util.Set; import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import ai.npc.AbstractNpcAI; import ai.npc.AbstractNpcAI;
...@@ -40,7 +41,7 @@ public final class GeneralDilios extends AbstractNpcAI ...@@ -40,7 +41,7 @@ public final class GeneralDilios extends AbstractNpcAI
private static final int GUARD_ID = 32619; private static final int GUARD_ID = 32619;
private L2Npc _general = null; private L2Npc _general = null;
private final Set<L2Spawn> _guards = Collections.emptySet(); private final Set<L2Spawn> _guards = Collections.newSetFromMap(new ConcurrentHashMap<L2Spawn, Boolean>());
private static final NpcStringId[] diliosText = private static final NpcStringId[] diliosText =
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment