From a90c1ac845b0483a8b24a2afe7ddfee2a6a8c9b3 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sun, 19 Oct 2014 11:49:45 +0200 Subject: [PATCH] =?UTF-8?q?Remove=20'throws=20Exception'=20from=20DNSUtil.?= =?UTF-8?q?resolve=E2=80=A6(String)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/org/jivesoftware/smack/util/DNSUtil.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java b/smack-core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java index 2817c5506..6e34f9400 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java @@ -111,9 +111,8 @@ public class DNSUtil { * @param domain the domain. * @return List of HostAddress, which encompasses the hostname and port that the * XMPP server can be reached at for the specified domain. - * @throws Exception */ - public static List resolveXMPPDomain(String domain) throws Exception { + public static List resolveXMPPDomain(String domain) { domain = idnaTransformer.transform(domain); if (dnsResolver == null) { LOGGER.warning("No DNS Resolver active in Smack, will be unable to perform DNS SRV lookups"); @@ -140,9 +139,8 @@ public class DNSUtil { * @param domain the domain. * @return List of HostAddress, which encompasses the hostname and port that the * XMPP server can be reached at for the specified domain. - * @throws Exception */ - public static List resolveXMPPServerDomain(String domain) throws Exception { + public static List resolveXMPPServerDomain(String domain) { domain = idnaTransformer.transform(domain); if (dnsResolver == null) { LOGGER.warning("No DNS Resolver active in Smack, will be unable to perform DNS SRV lookups"); @@ -153,7 +151,7 @@ public class DNSUtil { return resolveDomain(domain, DomainType.Server); } - private static List resolveDomain(String domain, DomainType domainType) throws Exception { + private static List resolveDomain(String domain, DomainType domainType) { List addresses = new ArrayList(); // Step one: Do SRV lookups