1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-12 14:01:08 +01:00

Make Provider.parse() just throw Exception

instead of throwing XmlPullParserException, IOException and
SmackException.

Add a guard to AbstractXMPPConnection.processPacket() to always re-throw
RuntimeExceptions.
This commit is contained in:
Florian Schmaus 2015-03-13 09:27:18 +01:00
parent 4d9bd6f216
commit bc093b620d
29 changed files with 63 additions and 156 deletions

View file

@ -17,14 +17,10 @@
package org.jivesoftware.smackx.disco.provider;
import java.io.IOException;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smackx.disco.packet.DiscoverInfo;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
/**
* The DiscoverInfoProvider parses Service Discovery information packets.
@ -35,7 +31,7 @@ public class DiscoverInfoProvider extends IQProvider<DiscoverInfo> {
@Override
public DiscoverInfo parse(XmlPullParser parser, int initialDepth)
throws XmlPullParserException, IOException, SmackException {
throws Exception {
DiscoverInfo discoverInfo = new DiscoverInfo();
boolean done = false;
DiscoverInfo.Identity identity = null;