mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +01:00
Type parsing now handles null.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1785 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
6696541c43
commit
59a0402000
1 changed files with 8 additions and 6 deletions
|
@ -57,7 +57,7 @@ package org.jivesoftware.smack.packet;
|
||||||
*
|
*
|
||||||
* @author Matt Tucker
|
* @author Matt Tucker
|
||||||
*/
|
*/
|
||||||
public abstract class IQ extends Packet {
|
public class IQ extends Packet {
|
||||||
|
|
||||||
private Type type = Type.GET;
|
private Type type = Type.GET;
|
||||||
|
|
||||||
|
@ -114,7 +114,9 @@ public abstract class IQ extends Packet {
|
||||||
*
|
*
|
||||||
* @return the query section of the IQ XML.
|
* @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:
|
* 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 final Type ERROR = new Type("error");
|
||||||
|
|
||||||
public static Type fromString(String type) {
|
public static Type fromString(String type) {
|
||||||
if (type.equals(GET.toString())) {
|
if (GET.toString().equals(type)) {
|
||||||
return GET;
|
return GET;
|
||||||
}
|
}
|
||||||
else if (type.equals(SET.toString())) {
|
else if (SET.toString().equals(type)) {
|
||||||
return SET;
|
return SET;
|
||||||
}
|
}
|
||||||
else if (type.equals(ERROR.toString())) {
|
else if (ERROR.toString().equals(type)) {
|
||||||
return ERROR;
|
return ERROR;
|
||||||
}
|
}
|
||||||
else if (type.equals(RESULT.toString())) {
|
else if (RESULT.toString().equals(type)) {
|
||||||
return RESULT;
|
return RESULT;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue