diff --git a/grpclb/src/main/java/io/grpc/grpclb/GrpclbLoadBalancerProvider.java b/grpclb/src/main/java/io/grpc/grpclb/GrpclbLoadBalancerProvider.java index eb748d3e1d4..57d85282e32 100644 --- a/grpclb/src/main/java/io/grpc/grpclb/GrpclbLoadBalancerProvider.java +++ b/grpclb/src/main/java/io/grpc/grpclb/GrpclbLoadBalancerProvider.java @@ -104,7 +104,6 @@ ConfigOrError parseLoadBalancingConfigPolicyInternal( * Gets a list from an object for the given key. Copy of * {@link io.grpc.internal.ServiceConfigUtil#getList}. */ - @SuppressWarnings("unchecked") @Nullable private static List getList(Map obj, String key) { assert key != null; diff --git a/netty/src/main/java/io/grpc/netty/ProtocolNegotiators.java b/netty/src/main/java/io/grpc/netty/ProtocolNegotiators.java index 3c93a88b55b..b35ab1f3922 100644 --- a/netty/src/main/java/io/grpc/netty/ProtocolNegotiators.java +++ b/netty/src/main/java/io/grpc/netty/ProtocolNegotiators.java @@ -276,7 +276,7 @@ protected void protocolNegotiationEventTriggered(ChannelHandlerContext ctx) { } else { nettyProxyHandler = new HttpProxyHandler(address, userName, password); } - ctx.pipeline().addBefore(ctx.name(), /* newName= */ null, nettyProxyHandler); + ctx.pipeline().addBefore(ctx.name(), /* name= */ null, nettyProxyHandler); } @Override diff --git a/xds/src/main/java/io/grpc/xds/XdsClientImpl.java b/xds/src/main/java/io/grpc/xds/XdsClientImpl.java index 2e0043ca5ef..f1c8f4d5167 100644 --- a/xds/src/main/java/io/grpc/xds/XdsClientImpl.java +++ b/xds/src/main/java/io/grpc/xds/XdsClientImpl.java @@ -699,7 +699,7 @@ private void handleCdsResponse(DiscoveryResponse cdsResponse) { // Management server is required to always send newly requested resources, even if they // may have been sent previously (proactively). Thus, client does not need to cache // unrequested resources. - if (!clusterWatchers.keySet().contains(clusterName)) { + if (!clusterWatchers.containsKey(clusterName)) { continue; } ClusterUpdate.Builder updateBuilder = ClusterUpdate.newBuilder(); @@ -1378,7 +1378,7 @@ static boolean matchHostName(String hostName, String pattern) { * containing {@link com.google.protobuf.Any} fields. */ @VisibleForTesting - static class MessagePrinter { + static final class MessagePrinter { private final JsonFormat.Printer printer; @VisibleForTesting