Make IQ.type private

to prevent subclasses form setting type to null.
This commit is contained in:
Florian Schmaus 2015-01-21 13:17:23 +01:00
parent 6a542824bc
commit 0f028fdf50
4 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,7 @@ public class EmptyResultIQ extends IQ {
public EmptyResultIQ() {
super(null, null);
type = IQ.Type.result;
setType(IQ.Type.result);
}
public EmptyResultIQ(IQ request) {

View File

@ -32,7 +32,7 @@ public class ErrorIQ extends SimpleIQ {
if (xmppError == null) {
throw new IllegalArgumentException("XMPPError must not be null");
}
type = IQ.Type.error;
setType(IQ.Type.error);
setError(xmppError);
}

View File

@ -47,7 +47,7 @@ public abstract class IQ extends Packet {
private final String childElementName;
private final String childElementNamespace;
protected Type type = Type.get;
private Type type = Type.get;
public IQ(IQ iq) {
super(iq);

View File

@ -33,7 +33,7 @@ public class HttpOverXmppReq extends AbstractHttpOverXmpp {
super(ELEMENT);
this.method = method;
this.resource = resource;
type = Type.set;
setType(Type.set);
}
private HttpMethod method;