xds: fix lint warnings (#7817)

This commit is contained in:
Chengyuan Zhang 2021-01-15 17:03:39 -08:00 committed by GitHub
parent 4130c5a1b8
commit 1b23cf4f39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

View File

@ -44,7 +44,7 @@ public final class InternalXdsAttributes {
*/
@NameResolver.ResolutionResultAttr
static final Attributes.Key<ObjectPool<XdsClient>> XDS_CLIENT_POOL =
Attributes.Key.create("io.grpc.xds.XdsAttributes.xdsClientPool");
Attributes.Key.create("io.grpc.xds.InternalXdsAttributes.xdsClientPool");
/**
* Attribute key for obtaining the global provider that provides atomics for aggregating
@ -52,7 +52,7 @@ public final class InternalXdsAttributes {
*/
@NameResolver.ResolutionResultAttr
static final Attributes.Key<CallCounterProvider> CALL_COUNTER_PROVIDER =
Attributes.Key.create("io.grpc.xds.XdsAttributes.callCounterProvider");
Attributes.Key.create("io.grpc.xds.InternalXdsAttributes.callCounterProvider");
/**
* Name of the cluster that provides this EquivalentAddressGroup.
@ -65,7 +65,7 @@ public final class InternalXdsAttributes {
// TODO (chengyuanzhang): temporary solution for migrating to LRS policy. Should access
// stats object via XdsClient interface.
static final Attributes.Key<LoadStatsStore> ATTR_CLUSTER_SERVICE_LOAD_STATS_STORE =
Attributes.Key.create("io.grpc.xds.XdsAttributes.loadStatsStore");
Attributes.Key.create("io.grpc.xds.InternalXdsAttributes.loadStatsStore");
private InternalXdsAttributes() {}
}

View File

@ -85,7 +85,7 @@ abstract class XdsClient {
return false;
}
LdsUpdate that = (LdsUpdate) o;
return Objects.equals(httpMaxStreamDurationNano, that.httpMaxStreamDurationNano)
return httpMaxStreamDurationNano == that.httpMaxStreamDurationNano
&& Objects.equals(rdsName, that.rdsName)
&& Objects.equals(virtualHosts, that.virtualHosts);
}

View File

@ -243,7 +243,6 @@ public class XdsNameResolverTest {
Collections.singletonList(route2)));
}
@SuppressWarnings("unchecked")
@Test
public void resolved_noTimeout() {
resolver.start(mockListener);