Skip to content

Commit

Permalink
Handler Collection changed to Set to prevent multiple registrations o…
Browse files Browse the repository at this point in the history
…f the same handler
  • Loading branch information
cyklon73 committed Mar 17, 2024
1 parent 1debeaf commit 9d8425d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/de/cyklon/jevent/JEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import de.cyklon.reflection.entities.members.ReflectParameter;
import de.cyklon.reflection.function.Filter;
import de.cyklon.reflection.function.Sorter;
import de.cyklon.reflection.types.Modifier;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

Expand Down Expand Up @@ -37,7 +36,7 @@ public static EventManager createManager() {
return new JEvent();
}

private final Collection<Handler<?>> handlers = new ArrayList<>();
private final Collection<Handler<?>> handlers = new HashSet<>();
private final Map<String, Object> parameterInstances = new HashMap<>();

private JEvent() {}
Expand Down

0 comments on commit 9d8425d

Please sign in to comment.