mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-12-12 05:51:08 +01:00
Introduce SmackParsingException
This commit is contained in:
parent
163ca2b009
commit
7dee3b88a2
54 changed files with 277 additions and 155 deletions
|
|
@ -17,7 +17,6 @@
|
|||
package org.jivesoftware.smackx.mood.provider;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
|
||||
import org.jivesoftware.smack.provider.ExtensionElementProvider;
|
||||
import org.jivesoftware.smackx.mood.element.MoodConcretisation;
|
||||
|
|
@ -28,5 +27,5 @@ import org.xmlpull.v1.XmlPullParserException;
|
|||
public abstract class MoodConcretisationProvider<C extends MoodConcretisation> extends ExtensionElementProvider<C> {
|
||||
|
||||
@Override
|
||||
public abstract C parse(XmlPullParser parser, int initialDepth) throws IOException, XmlPullParserException, ParseException;
|
||||
public abstract C parse(XmlPullParser parser, int initialDepth) throws IOException, XmlPullParserException;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,10 +20,10 @@ import static org.xmlpull.v1.XmlPullParser.END_TAG;
|
|||
import static org.xmlpull.v1.XmlPullParser.START_TAG;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.jivesoftware.smack.parsing.SmackParsingException;
|
||||
import org.jivesoftware.smack.provider.ExtensionElementProvider;
|
||||
import org.jivesoftware.smack.provider.ProviderManager;
|
||||
import org.jivesoftware.smackx.mood.Mood;
|
||||
|
|
@ -40,7 +40,7 @@ public class MoodProvider extends ExtensionElementProvider<MoodElement> {
|
|||
|
||||
@Override
|
||||
public MoodElement parse(XmlPullParser parser, int initialDepth)
|
||||
throws XmlPullParserException, IOException, ParseException {
|
||||
throws XmlPullParserException, IOException, SmackParsingException {
|
||||
String text = null;
|
||||
Mood mood = null;
|
||||
MoodConcretisation concretisation = null;
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@
|
|||
package org.jivesoftware.smackx.mood.provider;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
|
||||
import org.jivesoftware.smackx.mood.element.MoodConcretisation;
|
||||
|
||||
|
|
@ -34,7 +33,7 @@ import org.xmlpull.v1.XmlPullParserException;
|
|||
public abstract class SimpleMoodConcretisationProvider<C extends MoodConcretisation> extends MoodConcretisationProvider<C> {
|
||||
|
||||
@Override
|
||||
public C parse(XmlPullParser parser, int initialDepth) throws IOException, XmlPullParserException, ParseException {
|
||||
public C parse(XmlPullParser parser, int initialDepth) throws IOException, XmlPullParserException {
|
||||
// Since the elements name and namespace is known, we can just return an instance of the MoodConcretisation.
|
||||
return simpleExtension();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue