From 59a0402000c259ec4eb8b1619864ed0aa7ceb437 Mon Sep 17 00:00:00 2001 From: Matt Tucker Date: Wed, 15 Jan 2003 15:02:57 +0000 Subject: [PATCH] Type parsing now handles null. git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1785 b35dd754-fafc-0310-a699-88a17e54d16e --- source/org/jivesoftware/smack/packet/IQ.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/source/org/jivesoftware/smack/packet/IQ.java b/source/org/jivesoftware/smack/packet/IQ.java index eecdefbbe..40f671404 100644 --- a/source/org/jivesoftware/smack/packet/IQ.java +++ b/source/org/jivesoftware/smack/packet/IQ.java @@ -57,7 +57,7 @@ package org.jivesoftware.smack.packet; * * @author Matt Tucker */ -public abstract class IQ extends Packet { +public class IQ extends Packet { private Type type = Type.GET; @@ -114,7 +114,9 @@ public abstract class IQ extends Packet { * * @return the query section of the IQ XML. */ - public abstract String getQueryXML(); + public String getQueryXML() { + return null; + } /** * A class to represent the type of the IQ packet. Valid types are: @@ -134,16 +136,16 @@ public abstract class IQ extends Packet { public static final Type ERROR = new Type("error"); public static Type fromString(String type) { - if (type.equals(GET.toString())) { + if (GET.toString().equals(type)) { return GET; } - else if (type.equals(SET.toString())) { + else if (SET.toString().equals(type)) { return SET; } - else if (type.equals(ERROR.toString())) { + else if (ERROR.toString().equals(type)) { return ERROR; } - else if (type.equals(RESULT.toString())) { + else if (RESULT.toString().equals(type)) { return RESULT; } else {