diff options
author | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2015-05-27 17:54:30 +0300 |
---|---|---|
committer | Lyubomir Marinov <lyubomir.marinov@jitsi.org> | 2015-05-27 17:54:30 +0300 |
commit | 8d915ceb798dd546012a65ddbab44a17fdd6f283 (patch) | |
tree | 4c4c5d6737f5a60d1894aa9e8c2910c7de1ee14c /src/net/java/sip/communicator/impl | |
parent | 974ad832f3ba3e77196a8304c27011c5628aad32 (diff) | |
download | jitsi-8d915ceb798dd546012a65ddbab44a17fdd6f283.zip jitsi-8d915ceb798dd546012a65ddbab44a17fdd6f283.tar.gz jitsi-8d915ceb798dd546012a65ddbab44a17fdd6f283.tar.bz2 |
Manually fixes formatting.
Diffstat (limited to 'src/net/java/sip/communicator/impl')
-rw-r--r-- | src/net/java/sip/communicator/impl/dns/ParallelResolverImpl.java | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/src/net/java/sip/communicator/impl/dns/ParallelResolverImpl.java b/src/net/java/sip/communicator/impl/dns/ParallelResolverImpl.java index b00ff5b..cc9e3c7 100644 --- a/src/net/java/sip/communicator/impl/dns/ParallelResolverImpl.java +++ b/src/net/java/sip/communicator/impl/dns/ParallelResolverImpl.java @@ -122,9 +122,9 @@ public class ParallelResolverImpl } catch(UnknownHostException exc) { - logger - .warn("Seems like the primary DNS is down, trying fallback to " - + customResolverIP); + logger.warn( + "Seems like the primary DNS is down, trying fallback to " + + customResolverIP); } if(resolverAddress == null) @@ -170,20 +170,22 @@ public class ParallelResolverImpl { try { - backupResolver = new ExtendedResolver(new SimpleResolver[]{}); - for(InetSocketAddress backupServer : backupServers ) + backupResolver = new ExtendedResolver(new SimpleResolver[0]); + for(InetSocketAddress backupServer : backupServers) { SimpleResolver sr = new SimpleResolver(); + sr.setAddress(backupServer); backupResolver.addResolver(sr); } } catch (UnknownHostException e) { - //this shouldn't be thrown since we don't do any DNS querying - //in here. this is why we take an InetSocketAddress as a param. - throw new IllegalStateException("The impossible just happened: " - + "we could not initialize our backup DNS resolver"); + // this shouldn't be thrown since we don't do any DNS querying in + // here. this is why we take an InetSocketAddress as a param. + throw new IllegalStateException( + "The impossible just happened: we could not initialize our" + + " backup DNS resolver."); } } @@ -502,6 +504,7 @@ public class ParallelResolverImpl public void run() { Message localResponse = null; + try { localResponse = defaultResolver.send(query); @@ -509,12 +512,12 @@ public class ParallelResolverImpl catch (SocketTimeoutException exc) { logger.info("Default DNS resolver timed out."); - this.exception = exc; + exception = exc; } catch (Throwable exc) { logger.info("Default DNS resolver failed", exc); - this.exception = exc; + exception = exc; } //if the backup resolvers had already replied we ignore the @@ -564,8 +567,9 @@ public class ParallelResolverImpl } catch (Throwable exc) { - logger.info("Exception occurred during backup " - +"DNS resolving" + exc); + logger.info( + "Exception occurred during backup DNS resolving " + + exc); //keep this so that we can rethrow it exception = exc; |