mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-10-31 17:25:58 +01:00
Make sendStanza() final
This commit is contained in:
parent
5705f18f58
commit
dc780ffd6c
2 changed files with 3 additions and 5 deletions
|
@ -738,9 +738,8 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: This method should be final.
|
||||
@Override
|
||||
public void sendStanza(Stanza stanza) throws NotConnectedException, InterruptedException {
|
||||
public final void sendStanza(Stanza stanza) throws NotConnectedException, InterruptedException {
|
||||
Objects.requireNonNull(stanza, "Stanza must not be null");
|
||||
assert (stanza instanceof Message || stanza instanceof Presence || stanza instanceof IQ);
|
||||
|
||||
|
|
|
@ -23,7 +23,6 @@ import java.util.concurrent.LinkedBlockingQueue;
|
|||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.jivesoftware.smack.SmackException.NotConnectedException;
|
||||
import org.jivesoftware.smack.packet.IQ;
|
||||
import org.jivesoftware.smack.packet.IQ.Type;
|
||||
import org.jivesoftware.smack.packet.Message;
|
||||
|
@ -42,8 +41,8 @@ public class ThreadedDummyConnection extends DummyConnection {
|
|||
private volatile boolean timeout = false;
|
||||
|
||||
@Override
|
||||
public void sendStanza(Stanza packet) throws NotConnectedException, InterruptedException {
|
||||
super.sendStanza(packet);
|
||||
protected void sendStanzaInternal(Stanza packet) {
|
||||
super.sendStanzaInternal(packet);
|
||||
|
||||
if (packet instanceof IQ && !timeout) {
|
||||
timeout = false;
|
||||
|
|
Loading…
Reference in a new issue