1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-26 14:02:06 +01:00

Merge pull request #424 from adiaholic/plugModule

Make ModularXmppClientToServerConnectionConfiguration.addModule() public
This commit is contained in:
Florian Schmaus 2020-08-19 13:39:39 +02:00 committed by GitHub
commit 61799c5951
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -96,7 +96,7 @@ public final class ModularXmppClientToServerConnectionConfiguration extends Conn
return new ModularXmppClientToServerConnectionConfiguration(this); return new ModularXmppClientToServerConnectionConfiguration(this);
} }
void addModule(ModularXmppClientToServerConnectionModuleDescriptor connectionModule) { public void addModule(ModularXmppClientToServerConnectionModuleDescriptor connectionModule) {
Class<? extends ModularXmppClientToServerConnectionModuleDescriptor> moduleDescriptorClass = connectionModule.getClass(); Class<? extends ModularXmppClientToServerConnectionModuleDescriptor> moduleDescriptorClass = connectionModule.getClass();
if (modulesDescriptors.containsKey(moduleDescriptorClass)) { if (modulesDescriptors.containsKey(moduleDescriptorClass)) {
throw new IllegalArgumentException("A connection module for " + moduleDescriptorClass + " is already configured"); throw new IllegalArgumentException("A connection module for " + moduleDescriptorClass + " is already configured");