Fixed minor class cast issue

This commit is contained in:
steckbrief 2016-01-16 19:18:29 +01:00
parent d44debab67
commit 0594e1f8f8

View file

@ -7,14 +7,14 @@ import de.thedevstack.conversationsplus.xmpp.stanzas.IqPacket;
* Created by tzur on 15.01.2016.
*/
public class PubSubPacketParser {
public static PubSubPacket findPubSubPacket(IqPacket packet){
public static Element findPubSubPacket(IqPacket packet){
if (null == packet) {
return null;
}
return (PubSubPacket) packet.findChild("pubsub", "http://jabber.org/protocol/pubsub");
return packet.findChild("pubsub", "http://jabber.org/protocol/pubsub");
}
public static Element findItems(PubSubPacket pubSubPacket) {
public static Element findItemsFromPubSubElement(Element pubSubPacket) {
if (null == pubSubPacket) {
return null;
}
@ -22,6 +22,6 @@ public class PubSubPacketParser {
}
public static Element findItems(IqPacket packet) {
return PubSubPacketParser.findItems(PubSubPacketParser.findPubSubPacket(packet));
return PubSubPacketParser.findItemsFromPubSubElement(PubSubPacketParser.findPubSubPacket(packet));
}
}