1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 09:39:39 +02: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

@ -20,7 +20,6 @@ import java.io.IOException;
import java.io.Reader;
import java.io.StringReader;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smack.util.ParserUtils;
@ -79,13 +78,13 @@ final public class TestUtils {
}
public static <EE extends ExtensionElement> EE parseExtensionElement(String elementString)
throws XmlPullParserException, IOException, SmackException {
throws Exception {
return parseExtensionElement(getParser(elementString));
}
@SuppressWarnings("unchecked")
public static <EE extends ExtensionElement> EE parseExtensionElement(XmlPullParser parser)
throws XmlPullParserException, IOException, SmackException {
throws Exception {
ParserUtils.assertAtStartTag(parser);
final String elementName = parser.getName();
final String namespace = parser.getNamespace();