mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22:05 +01:00
Fix ConnectionConfiguration.getEnabledSaslMechanisms()
in case enabledSaslMechanisms is null, because then unmodifiableSet() will throw an NPE. Thanks to Nándor Holozsnyák for reporting.
This commit is contained in:
parent
0a6843f41f
commit
3640339073
1 changed files with 9 additions and 0 deletions
|
@ -472,7 +472,16 @@ public abstract class ConnectionConfiguration {
|
||||||
return enabledSaslMechanisms.contains(saslMechanism);
|
return enabledSaslMechanisms.contains(saslMechanism);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the explicitly enabled SASL mechanisms. May return <code>null</code> if no SASL mechanisms where
|
||||||
|
* explicitly enabled, i.e. all SALS mechanisms supported and announced by the service will be considered.
|
||||||
|
*
|
||||||
|
* @return the enabled SASL mechanisms or <code>null</code>.
|
||||||
|
*/
|
||||||
public Set<String> getEnabledSaslMechanisms() {
|
public Set<String> getEnabledSaslMechanisms() {
|
||||||
|
if (enabledSaslMechanisms == null) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return Collections.unmodifiableSet(enabledSaslMechanisms);
|
return Collections.unmodifiableSet(enabledSaslMechanisms);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue