Reformat some code

This commit is contained in:
Daniel Trebbien 2017-07-28 19:28:18 -07:00 committed by Colm O hEigeartaigh
parent 7480c66031
commit 252dda94a3
1 changed files with 24 additions and 21 deletions

View File

@ -291,26 +291,29 @@ public class MulticastDiscoveryAgent implements DiscoveryAgent, Runnable {
discoveryURI = new URI(DEFAULT_DISCOVERY_URI_STRING);
}
if (LOG.isTraceEnabled())
LOG.trace("start - discoveryURI = " + discoveryURI);
if (LOG.isTraceEnabled()) {
LOG.trace("start - discoveryURI = " + discoveryURI);
}
String myHost = discoveryURI.getHost();
int myPort = discoveryURI.getPort();
String myHost = discoveryURI.getHost();
int myPort = discoveryURI.getPort();
if( DEFAULT_HOST_STR.equals(myHost) )
myHost = DEFAULT_HOST_IP;
if (DEFAULT_HOST_STR.equals(myHost)) {
myHost = DEFAULT_HOST_IP;
}
if(myPort < 0 )
myPort = DEFAULT_PORT;
if (myPort < 0) {
myPort = DEFAULT_PORT;
}
if (LOG.isTraceEnabled()) {
LOG.trace("start - myHost = " + myHost);
LOG.trace("start - myPort = " + myPort);
LOG.trace("start - group = " + group );
LOG.trace("start - interface = " + mcInterface );
LOG.trace("start - network interface = " + mcNetworkInterface );
LOG.trace("start - join network interface = " + mcJoinNetworkInterface );
}
if (LOG.isTraceEnabled()) {
LOG.trace("start - myHost = " + myHost);
LOG.trace("start - myPort = " + myPort);
LOG.trace("start - group = " + group);
LOG.trace("start - interface = " + mcInterface);
LOG.trace("start - network interface = " + mcNetworkInterface);
LOG.trace("start - join network interface = " + mcJoinNetworkInterface);
}
this.inetAddress = InetAddress.getByName(myHost);
this.sockAddress = new InetSocketAddress(this.inetAddress, myPort);