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:
parent
6a542824bc
commit
0f028fdf50
4 changed files with 4 additions and 4 deletions
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue