mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-21 22:02:06 +01:00
Merge branch '4.4'
This commit is contained in:
commit
a2636b2f60
3 changed files with 10 additions and 6 deletions
|
@ -19,6 +19,7 @@ package org.jivesoftware.smack.tcp.rce;
|
|||
import java.net.InetAddress;
|
||||
|
||||
import org.jivesoftware.smack.datatypes.UInt16;
|
||||
import org.jivesoftware.smack.util.Objects;
|
||||
import org.jivesoftware.smack.util.rce.SingleAddressRemoteConnectionEndpoint;
|
||||
|
||||
import org.minidns.record.InternetAddressRR;
|
||||
|
@ -33,9 +34,9 @@ public final class IpTcpRemoteConnectionEndpoint<IARR extends InternetAddressRR<
|
|||
private final IARR internetAddressResourceRecord;
|
||||
|
||||
public IpTcpRemoteConnectionEndpoint(CharSequence host, UInt16 port, IARR internetAddressResourceRecord) {
|
||||
this.host = host;
|
||||
this.port = port;
|
||||
this.internetAddressResourceRecord = internetAddressResourceRecord;
|
||||
this.host = Objects.requireNonNull(host);
|
||||
this.port = Objects.requireNonNull(port);
|
||||
this.internetAddressResourceRecord = Objects.requireNonNull(internetAddressResourceRecord);
|
||||
}
|
||||
|
||||
public static IpTcpRemoteConnectionEndpoint<InternetAddressRR<?>> from(CharSequence host, UInt16 port,
|
||||
|
|
|
@ -192,8 +192,10 @@ public class RemoteXmppTcpConnectionEndpoints {
|
|||
|
||||
for (SRV srv : sortedSrvRecords) {
|
||||
List<InetAddress> targetInetAddresses = dnsResolver.lookupHostAddress(srv.target, lookupFailures, dnssecMode);
|
||||
SrvXmppRemoteConnectionEndpoint endpoint = new SrvXmppRemoteConnectionEndpoint(srv, targetInetAddresses);
|
||||
endpoints.add(endpoint);
|
||||
if (targetInetAddresses != null) {
|
||||
SrvXmppRemoteConnectionEndpoint endpoint = new SrvXmppRemoteConnectionEndpoint(srv, targetInetAddresses);
|
||||
endpoints.add(endpoint);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LOGGER.info("Could not resolve DNS SRV resource records for " + srvDomain + ". Consider adding those.");
|
||||
|
|
|
@ -21,6 +21,7 @@ import java.util.Collection;
|
|||
import java.util.List;
|
||||
|
||||
import org.jivesoftware.smack.datatypes.UInt16;
|
||||
import org.jivesoftware.smack.util.Objects;
|
||||
import org.jivesoftware.smack.util.rce.RemoteConnectionEndpoint;
|
||||
|
||||
import org.minidns.record.SRV;
|
||||
|
@ -36,7 +37,7 @@ public abstract class SrvRemoteConnectionEndpoint implements RemoteConnectionEnd
|
|||
protected SrvRemoteConnectionEndpoint(SRV srv, List<? extends InetAddress> inetAddresses) {
|
||||
this.srv = srv;
|
||||
this.port = UInt16.from(srv.port);
|
||||
this.inetAddresses = inetAddresses;
|
||||
this.inetAddresses = Objects.requireNonNull(inetAddresses);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue