diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/provider/DataFormProvider.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/provider/DataFormProvider.java index e20270962..5efdc9ad9 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/provider/DataFormProvider.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/provider/DataFormProvider.java @@ -68,7 +68,7 @@ public class DataFormProvider extends PacketExtensionProvider { } // See XEP-141 Data Forms Layout else if (parser.getName().equals(DataLayout.ELEMENT) && parser.getNamespace().equals(DataLayout.NAMESPACE)) { - dataForm.addExtensionElement(DataLayoutProvider.INSTANCE.parse(parser)); + dataForm.addExtensionElement(DataLayoutProvider.parse(parser)); } } else if (eventType == XmlPullParser.END_TAG) { if (parser.getName().equals(dataForm.getElementName())) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatalayout/provider/DataLayoutProvider.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatalayout/provider/DataLayoutProvider.java index 45bc7d6c8..80b5a0101 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatalayout/provider/DataLayoutProvider.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdatalayout/provider/DataLayoutProvider.java @@ -20,7 +20,6 @@ import java.io.IOException; import java.util.List; import org.jivesoftware.smack.SmackException; -import org.jivesoftware.smack.provider.PacketExtensionProvider; import org.jivesoftware.smackx.xdatalayout.packet.DataLayout; import org.jivesoftware.smackx.xdatalayout.packet.DataLayout.DataFormLayoutElement; import org.jivesoftware.smackx.xdatalayout.packet.DataLayout.Fieldref; @@ -36,16 +35,9 @@ import org.xmlpull.v1.XmlPullParserException; * @author Anno van Vliet * */ -public class DataLayoutProvider extends PacketExtensionProvider { +public class DataLayoutProvider { - public static final DataLayoutProvider INSTANCE = new DataLayoutProvider(); - - - /* (non-Javadoc) - * @see org.jivesoftware.smack.provider.Provider#parse(org.xmlpull.v1.XmlPullParser, int) - */ - @Override - public DataLayout parse(XmlPullParser parser, int initialDepth) throws XmlPullParserException, IOException, + public static DataLayout parse(XmlPullParser parser) throws XmlPullParserException, IOException, SmackException { DataLayout dataLayout = new DataLayout(parser.getAttributeValue("", "label")); parseLayout(dataLayout.getPageLayout(), parser); diff --git a/smack-extensions/src/main/resources/org.jivesoftware.smackx/extensions.providers b/smack-extensions/src/main/resources/org.jivesoftware.smackx/extensions.providers index 373fc1294..1a517b9df 100644 --- a/smack-extensions/src/main/resources/org.jivesoftware.smackx/extensions.providers +++ b/smack-extensions/src/main/resources/org.jivesoftware.smackx/extensions.providers @@ -481,12 +481,4 @@ http://jabber.org/protocol/rsm org.jivesoftware.smackx.rsm.provider.RSMSetProvider - - - - page - http://jabber.org/protocol/xdata-layout - org.jivesoftware.smackx.xdatalayout.provider.DataLayoutProvider - - diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/xdatalayout/packet/DataLayoutTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/xdatalayout/packet/DataLayoutTest.java index 7fc28b4e3..0ac475b0d 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/xdatalayout/packet/DataLayoutTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/xdatalayout/packet/DataLayoutTest.java @@ -66,11 +66,9 @@ public class DataLayoutTest { logger.finest(output); assertEquals(TEST_OUTPUT_2, output); - DataLayoutProvider pr = DataLayoutProvider.INSTANCE; - XmlPullParser parser = getParser(output); - layout = pr.parse(parser); + layout = DataLayoutProvider.parse(parser); assertEquals(3 , layout.getPageLayout().size()); assertEquals("Label", layout.getLabel()); @@ -106,11 +104,9 @@ public class DataLayoutTest { logger.finest(output); assertEquals(TEST_OUTPUT_SPECIAL, output); - DataLayoutProvider pr = DataLayoutProvider.INSTANCE; - XmlPullParser parser = getParser(output); - layout = pr.parse(parser); + layout = DataLayoutProvider.parse(parser); assertEquals(5 , layout.getPageLayout().size()); assertEquals("Label - & \u00E9 \u00E1 ", layout.getLabel());