xds: simplify condition (#6463)

This commit is contained in:
Jihun Cho 2019-11-25 13:22:38 -08:00 committed by GitHub
parent 7db873f1f6
commit 09d5093295
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -554,7 +554,7 @@ final class XdsClientImpl extends XdsClient {
// Inside of it: the address field must be set.
for (io.envoyproxy.envoy.api.v2.endpoint.LbEndpoint lbEndpoint
: localityLbEndpoints.getLbEndpointsList()) {
if (!lbEndpoint.hasEndpoint() || !lbEndpoint.getEndpoint().hasAddress()) {
if (!lbEndpoint.getEndpoint().hasAddress()) {
errorMessage = "Invalid endpoint address information.";
break;
}