From: David ‘Bombe’ Roden Date: Sun, 6 Jan 2013 16:21:31 +0000 (+0100) Subject: Allow updating of reactions without having to remove them first. X-Git-Tag: 0.1~61 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=178222dd2c004946895d522a954b6c3eaf926c09;p=rhynodge.git Allow updating of reactions without having to remove them first. --- 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(); }