Reduce conditionals in DnsNameResovlerContext

Motivation:
Minor cleanup from 844d804 just to reduce the conditional statements and indentation level.

Modifications:
- combine the else + if into an else if statement

Result:
Code cleaned up.
This commit is contained in:
Scott Mitchell 2017-11-20 12:36:36 -08:00
parent 93b144b7b4
commit 907ed79069

View File

@ -141,14 +141,12 @@ abstract class DnsNameResolverContext<T> {
promise.trySuccess(future.getNow());
} else if (searchDomainIdx < searchDomains.length) {
doSearchDomainQuery(hostname + '.' + searchDomains[searchDomainIdx++], this);
} else {
if (!startWithoutSearchDomain) {
} else if (!startWithoutSearchDomain) {
internalResolve(promise);
} else {
promise.tryFailure(new SearchDomainUnknownHostException(future.cause(), hostname));
}
}
}
});
}
}