1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-12-17 02:21:08 +01:00

Introduce NotAPubSubNodeException

Fixes SMACK-759.
This commit is contained in:
Florian Schmaus 2017-08-14 20:14:35 +02:00
parent b9ed22c732
commit 772e45da92
8 changed files with 86 additions and 80 deletions

View file

@ -39,6 +39,7 @@ import org.jivesoftware.smackx.disco.ServiceDiscoveryManager;
import org.jivesoftware.smackx.pubsub.EventElement;
import org.jivesoftware.smackx.pubsub.Item;
import org.jivesoftware.smackx.pubsub.LeafNode;
import org.jivesoftware.smackx.pubsub.PubSubException.NotAPubSubNodeException;
import org.jivesoftware.smackx.pubsub.PubSubFeature;
import org.jivesoftware.smackx.pubsub.PubSubManager;
import org.jivesoftware.smackx.pubsub.filter.EventExtensionFilter;
@ -137,9 +138,10 @@ public final class PEPManager extends Manager {
* @throws InterruptedException
* @throws XMPPErrorException
* @throws NoResponseException
* @throws NotAPubSubNodeException
*/
public void publish(Item item, String node) throws NotConnectedException, InterruptedException,
NoResponseException, XMPPErrorException {
NoResponseException, XMPPErrorException, NotAPubSubNodeException {
XMPPConnection connection = connection();
PubSubManager pubSubManager = PubSubManager.getInstance(connection, connection.getUser().asEntityBareJid());
LeafNode pubSubNode = pubSubManager.getNode(node);