AnsweredAssumed Answered

IllegalArgumentException for wrong custom host

Question asked by Grigory Fedorov on Jan 8, 2017
Latest reply on Jan 9, 2017 by Grigory Fedorov

I set host using XMPPTCPConnectionConfiguration.Builder.setHost

If host is wrong, I've got IllegalArgumentException:

W/System.err: java.lang.IllegalArgumentException: Must provide at least one InetAddress

W/System.err:     at org.jivesoftware.smack.util.dns.HostAddress.<init>(HostAddress.java:55)

W/System.err:     at org.jivesoftware.smack.util.dns.DNSResolver.lookupHostAddress(DNSResolver.java: 56)

W/System.err:     at org.jivesoftware.smack.AbstractXMPPConnection.populateHostAddresses(AbstractXMP PConnection.java:618)

W/System.err:     at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration(XMPPTCPC onnection.java:556)

W/System.err:     at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal(XMPPTCPConnection. java:887)

W/System.err:     at org.jivesoftware.smack.AbstractXMPPConnection.connect(AbstractXMPPConnection.ja va:377)

So, I configure connection, call "connect" and get unexpected IllegalArgumentException.

Should it be a kind of IOException or SmackException?

Using Smack 4.2.0-RC2-SNAPHOT

Outcomes