mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-12-22 20:47:57 +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.StanzaError;
|
||||
import org.jivesoftware.smack.packet.StanzaError.Condition;
|
||||
import org.jivesoftware.smack.util.StringUtils;
|
||||
|
||||
import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
|
||||
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
|
||||
|
@ -268,6 +269,7 @@ public final class PubSubManager extends Manager {
|
|||
* @throws 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);
|
||||
|
||||
if (node == null) {
|
||||
|
|
Loading…
Reference in a new issue