1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 12:02:05 +01:00

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() { public EmptyResultIQ() {
super(null, null); super(null, null);
type = IQ.Type.result; setType(IQ.Type.result);
} }
public EmptyResultIQ(IQ request) { public EmptyResultIQ(IQ request) {

View file

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

View file

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

View file

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