diff --git a/xds/src/main/java/com/linecorp/armeria/xds/BootstrapListeners.java b/xds/src/main/java/com/linecorp/armeria/xds/BootstrapListeners.java index 091da11b83e..ab2bddfe068 100644 --- a/xds/src/main/java/com/linecorp/armeria/xds/BootstrapListeners.java +++ b/xds/src/main/java/com/linecorp/armeria/xds/BootstrapListeners.java @@ -18,7 +18,6 @@ import java.util.Map; import com.google.common.collect.ImmutableMap; -import com.google.common.collect.ImmutableMap.Builder; import io.envoyproxy.envoy.config.bootstrap.v3.Bootstrap; import io.envoyproxy.envoy.config.bootstrap.v3.Bootstrap.StaticResources; @@ -29,7 +28,7 @@ final class BootstrapListeners { private final Map listeners; BootstrapListeners(Bootstrap bootstrap) { - final Builder builder = ImmutableMap.builder(); + final ImmutableMap.Builder builder = ImmutableMap.builder(); if (bootstrap.hasStaticResources()) { final StaticResources staticResources = bootstrap.getStaticResources(); for (Listener listener: staticResources.getListenersList()) { diff --git a/xds/src/main/java/com/linecorp/armeria/xds/XdsConverterUtil.java b/xds/src/main/java/com/linecorp/armeria/xds/XdsConverterUtil.java index 63152c7b146..928fba240a8 100644 --- a/xds/src/main/java/com/linecorp/armeria/xds/XdsConverterUtil.java +++ b/xds/src/main/java/com/linecorp/armeria/xds/XdsConverterUtil.java @@ -48,7 +48,7 @@ static List convertEndpoints(ClusterLoadAssignment clusterLoadAssignme } static List convertEndpoints(ClusterLoadAssignment clusterLoadAssignment, Struct filterMetadata) { - checkArgument(filterMetadata.getFieldsCount() != 0, + checkArgument(filterMetadata.getFieldsCount() > 0, "filterMetadata.getFieldsCount(): %s (expected: > 0)", filterMetadata.getFieldsCount()); final Predicate lbEndpointPredicate = lbEndpoint -> { final Struct endpointMetadata = lbEndpoint.getMetadata().getFilterMetadataOrDefault(