mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22:05 +01:00
Disallow null or empty string in PubSubManager.getNode(String)
This commit is contained in:
parent
ef88bb17d0
commit
a3f6fa65a4
1 changed files with 2 additions and 0 deletions
|
@ -37,6 +37,7 @@ import org.jivesoftware.smack.packet.IQ.Type;
|
||||||
import org.jivesoftware.smack.packet.Stanza;
|
import org.jivesoftware.smack.packet.Stanza;
|
||||||
import org.jivesoftware.smack.packet.StanzaError;
|
import org.jivesoftware.smack.packet.StanzaError;
|
||||||
import org.jivesoftware.smack.packet.StanzaError.Condition;
|
import org.jivesoftware.smack.packet.StanzaError.Condition;
|
||||||
|
import org.jivesoftware.smack.util.StringUtils;
|
||||||
|
|
||||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||||
|
@ -268,6 +269,7 @@ public final class PubSubManager extends Manager {
|
||||||
* @throws NotAPubSubNodeException
|
* @throws NotAPubSubNodeException
|
||||||
*/
|
*/
|
||||||
public Node getNode(String id) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotAPubSubNodeException {
|
public Node getNode(String id) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, NotAPubSubNodeException {
|
||||||
|
StringUtils.requireNotNullNorEmpty(id, "The node ID can not be null or the empty string");
|
||||||
Node node = nodeMap.get(id);
|
Node node = nodeMap.get(id);
|
||||||
|
|
||||||
if (node == null) {
|
if (node == null) {
|
||||||
|
|
Loading…
Reference in a new issue