Skip to content

Commit

Permalink
Raise an exception if registering a duplicate plugin channel name
Browse files Browse the repository at this point in the history
  • Loading branch information
bundabrg committed Jun 30, 2021
1 parent 5e8fceb commit 01c0f64
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -581,9 +581,9 @@ public boolean useXmlReflections() {
*
* @param channel Channel to register
*/
public void registerPluginChannel(String channel) {
public void registerPluginChannel(String channel) throws IllegalArgumentException {
if (registeredPluginChannels.contains(channel)) {
return;
throw new IllegalArgumentException("Channel already registered");
}

registeredPluginChannels.add(channel);
Expand Down

0 comments on commit 01c0f64

Please sign in to comment.