mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 09:09:38 +02:00
Fix OOB exception when setHostAddress(InetAddress) is used.
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.String.charAt(String.java:658) at org.jivesoftware.smack.util.dns.HostAddress.<init>(HostAddress.java:48) at org.jivesoftware.smack.util.dns.HostAddress.<init>(HostAddress.java:62)
This commit is contained in:
parent
157ff138a4
commit
e9bbe9a475
3 changed files with 12 additions and 9 deletions
|
@ -593,6 +593,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
}
|
||||
failedAddresses.add(hostAddress);
|
||||
} else {
|
||||
StringUtils.requireNotNullOrEmpty(host, "Host of HostAddress " + hostAddress + " must not be null when using a Proxy");
|
||||
final String hostAndPort = host + " at port " + port;
|
||||
LOGGER.finer("Trying to establish TCP connection via Proxy to " + hostAndPort);
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue