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:
parent
93b144b7b4
commit
907ed79069
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user