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:
parent
4d9bd6f216
commit
bc093b620d
29 changed files with 63 additions and 156 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue