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());
|
promise.trySuccess(future.getNow());
|
||||||
} else if (searchDomainIdx < searchDomains.length) {
|
} else if (searchDomainIdx < searchDomains.length) {
|
||||||
doSearchDomainQuery(hostname + '.' + searchDomains[searchDomainIdx++], this);
|
doSearchDomainQuery(hostname + '.' + searchDomains[searchDomainIdx++], this);
|
||||||
} else {
|
} else if (!startWithoutSearchDomain) {
|
||||||
if (!startWithoutSearchDomain) {
|
|
||||||
internalResolve(promise);
|
internalResolve(promise);
|
||||||
} else {
|
} else {
|
||||||
promise.tryFailure(new SearchDomainUnknownHostException(future.cause(), hostname));
|
promise.tryFailure(new SearchDomainUnknownHostException(future.cause(), hostname));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user