mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22:05 +01:00
Use Objects.requireNonNull() in BytestreamSIDFilter
This commit is contained in:
parent
98cfad6cc6
commit
33cf205bdc
1 changed files with 3 additions and 5 deletions
|
@ -32,6 +32,7 @@ import org.jivesoftware.smack.filter.PacketFilter;
|
||||||
import org.jivesoftware.smack.filter.PacketTypeFilter;
|
import org.jivesoftware.smack.filter.PacketTypeFilter;
|
||||||
import org.jivesoftware.smack.packet.IQ;
|
import org.jivesoftware.smack.packet.IQ;
|
||||||
import org.jivesoftware.smack.packet.Stanza;
|
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.Socks5BytestreamManager;
|
||||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamRequest;
|
import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamRequest;
|
||||||
import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamSession;
|
import org.jivesoftware.smackx.bytestreams.socks5.Socks5BytestreamSession;
|
||||||
|
@ -127,14 +128,11 @@ public class Socks5TransferNegotiator extends StreamNegotiator {
|
||||||
*/
|
*/
|
||||||
private static class BytestreamSIDFilter extends PacketTypeFilter {
|
private static class BytestreamSIDFilter extends PacketTypeFilter {
|
||||||
|
|
||||||
private String sessionID;
|
private final String sessionID;
|
||||||
|
|
||||||
public BytestreamSIDFilter(String sessionID) {
|
public BytestreamSIDFilter(String sessionID) {
|
||||||
super(Bytestream.class);
|
super(Bytestream.class);
|
||||||
if (sessionID == null) {
|
this.sessionID = Objects.requireNonNull(sessionID, "SessionID cannot be null");
|
||||||
throw new IllegalArgumentException("StreamID cannot be null");
|
|
||||||
}
|
|
||||||
this.sessionID = sessionID;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue