1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 09:09:38 +02:00

Rework exceptions in the parsing / provider subsystem

This commit is contained in:
Florian Schmaus 2019-02-05 10:41:50 +01:00
parent 4c42d0cd32
commit 083dac8b83
130 changed files with 504 additions and 342 deletions

View file

@ -1,6 +1,6 @@
/**
*
* Copyright © 2003-2007 Jive Software, 2014-2015 Florian Schmaus
* Copyright © 2003-2007 Jive Software, 2014-2019 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -18,7 +18,6 @@ package org.jivesoftware.smack.roster.provider;
import java.io.IOException;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.roster.packet.RosterPacket;
@ -34,8 +33,7 @@ public class RosterPacketProvider extends IQProvider<RosterPacket> {
public static final RosterPacketProvider INSTANCE = new RosterPacketProvider();
@Override
public RosterPacket parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException,
SmackException {
public RosterPacket parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException {
RosterPacket roster = new RosterPacket();
String version = parser.getAttributeValue("", "ver");
roster.setVersion(version);

View file

@ -1,6 +1,6 @@
/**
*
* Copyright © 2015 Florian Schmaus
* Copyright © 2015-2019 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,20 +16,15 @@
*/
package org.jivesoftware.smack.roster.provider;
import java.io.IOException;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smack.roster.packet.RosterVer;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
public class RosterVerStreamFeatureProvider extends ExtensionElementProvider<RosterVer> {
@Override
public RosterVer parse(XmlPullParser parser, int initialDepth)
throws XmlPullParserException, IOException, SmackException {
public RosterVer parse(XmlPullParser parser, int initialDepth) {
return RosterVer.INSTANCE;
}

View file

@ -16,20 +16,15 @@
*/
package org.jivesoftware.smack.roster.provider;
import java.io.IOException;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smack.roster.packet.SubscriptionPreApproval;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
public class SubscriptionPreApprovalStreamFeatureProvider extends ExtensionElementProvider<SubscriptionPreApproval> {
@Override
public SubscriptionPreApproval parse(XmlPullParser parser, int initialDepth)
throws XmlPullParserException, IOException, SmackException {
public SubscriptionPreApproval parse(XmlPullParser parser, int initialDepth) {
return SubscriptionPreApproval.INSTANCE;
}