mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-23 19:18:00 +01:00
Add assert to IQ.initializeAsResultFor(IQ)
This method is not meant to be used to be invoked with the identity.
This commit is contained in:
parent
870e6c674a
commit
1b5a264d52
1 changed files with 2 additions and 0 deletions
|
@ -261,6 +261,8 @@ public abstract class IQ extends Stanza {
|
|||
}
|
||||
|
||||
protected final void initializeAsResultFor(IQ request) {
|
||||
assert this != request;
|
||||
|
||||
if (!(request.getType() == Type.get || request.getType() == Type.set)) {
|
||||
throw new IllegalArgumentException(
|
||||
"IQ must be of type 'set' or 'get'. Original IQ: " + request.toXML());
|
||||
|
|
Loading…
Reference in a new issue