From 178222dd2c004946895d522a954b6c3eaf926c09 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 6 Jan 2013 17:21:31 +0100 Subject: [PATCH] Allow updating of reactions without having to remove them first. --- src/main/java/net/pterodactylus/reactor/engine/Engine.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/main/java/net/pterodactylus/reactor/engine/Engine.java b/src/main/java/net/pterodactylus/reactor/engine/Engine.java index 7c50081..64f2c83 100644 --- a/src/main/java/net/pterodactylus/reactor/engine/Engine.java +++ b/src/main/java/net/pterodactylus/reactor/engine/Engine.java @@ -64,15 +64,9 @@ public class Engine extends AbstractExecutionThreadService { * The name of the reaction * @param reaction * The reaction to add to this engine - * @throws IllegalStateException - * if the engine already contains a {@link Reaction} with the - * given name */ public void addReaction(String name, Reaction reaction) { synchronized (reactions) { - if (reactions.containsKey(name)) { - throw new IllegalStateException(String.format("Engine already contains a Reaction named “%s!”", name)); - } reactions.put(name, reaction); reactions.notifyAll(); } -- 2.7.4