1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 10:37:59 +01:00

Use Objects.requireNonNull() in BytestreamSIDFilter

This commit is contained in:
Florian Schmaus 2015-02-18 09:27:27 +01:00
parent 98cfad6cc6
commit 33cf205bdc

View file

@ -32,6 +32,7 @@ import org.jivesoftware.smack.filter.PacketFilter;
import org.jivesoftware.smack.filter.PacketTypeFilter;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.util.Objects;
import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamManager;
import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamRequest;
import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamSession;
@ -127,14 +128,11 @@ public class Socks5TransferNegotiator extends StreamNegotiator {
*/
private static class BytestreamSIDFilter extends PacketTypeFilter {
private String sessionID;
private final String sessionID;
public BytestreamSIDFilter(String sessionID) {
super(Bytestream.class);
if (sessionID == null) {
throw new IllegalArgumentException("StreamID cannot be null");
}
this.sessionID = sessionID;
this.sessionID = Objects.requireNonNull(sessionID, "SessionID cannot be null");
}
@Override