1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-14 06:51:08 +01:00

Merge Smack 4.1.0-rc2

Conflicts:
	smack-core/src/main/java/org/jivesoftware/smack/filter/FromMatchesFilter.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/iqregister/AccountManager.java
	version.gradle
This commit is contained in:
Florian Schmaus 2015-02-21 18:07:45 +01:00
commit fbf0ba13ce
48 changed files with 650 additions and 166 deletions

View file

@ -176,11 +176,8 @@ public class FaultTolerantNegotiator extends StreamNegotiator {
this.collector = collector;
}
public InputStream call() throws XMPPErrorException, InterruptedException, SmackException {
Stanza streamInitiation = collector.nextResult();
if (streamInitiation == null) {
throw new NoResponseException(connection);
}
public InputStream call() throws XMPPErrorException, InterruptedException, NoResponseException, SmackException {
Stanza streamInitiation = collector.nextResultOrThrow();
StreamNegotiator negotiator = determineNegotiator(streamInitiation);
return negotiator.negotiateIncomingStream(streamInitiation);
}

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;
@ -128,14 +129,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