all: fix lint and revert redundant lint fixes in #5570 (#5787)

* Revert "all: fix lint (#5770)"

This reverts commit 00d4cc29ad.

* all: fix lint and revert redundant lint fix in #5570
This commit is contained in:
Chengyuan Zhang 2019-05-24 01:02:12 -07:00 committed by GitHub
parent 2180fcd113
commit d86d3dd363
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 2 additions and 21 deletions

View File

@ -85,7 +85,6 @@ public final class AltsProtocolNegotiator {
} }
} }
@VisibleForTesting
private static final class ClientAltsProtocolNegotiator implements ProtocolNegotiator { private static final class ClientAltsProtocolNegotiator implements ProtocolNegotiator {
private final TsiHandshakerFactory handshakerFactory; private final TsiHandshakerFactory handshakerFactory;
private final LazyChannel lazyHandshakerChannel; private final LazyChannel lazyHandshakerChannel;

View File

@ -124,7 +124,6 @@ public class LoadBalancerTest {
@Deprecated @Deprecated
@Test @Test
@SuppressWarnings("deprecation")
public void helper_createSubchannel_old_delegates() { public void helper_createSubchannel_old_delegates() {
class OverrideCreateSubchannel extends NoopHelper { class OverrideCreateSubchannel extends NoopHelper {
boolean ran; boolean ran;

View File

@ -1053,7 +1053,6 @@ final class ManagedChannelImpl extends ManagedChannel implements
@Deprecated @Deprecated
@Override @Override
@SuppressWarnings("deprecation")
public AbstractSubchannel createSubchannel( public AbstractSubchannel createSubchannel(
List<EquivalentAddressGroup> addressGroups, Attributes attrs) { List<EquivalentAddressGroup> addressGroups, Attributes attrs) {
logWarningIfNotInSyncContext("createSubchannel()"); logWarningIfNotInSyncContext("createSubchannel()");

View File

@ -341,7 +341,6 @@ public class ManagedChannelImplTest {
@Deprecated @Deprecated
@Test @Test
@SuppressWarnings("deprecation")
public void createSubchannel_old_outsideSynchronizationContextShouldLogWarning() { public void createSubchannel_old_outsideSynchronizationContextShouldLogWarning() {
createChannel(); createChannel();
final AtomicReference<LogRecord> logRef = new AtomicReference<>(); final AtomicReference<LogRecord> logRef = new AtomicReference<>();

View File

@ -364,7 +364,7 @@ final class XdsComms {
case MILLION: case MILLION:
break; break;
default: default:
throw new IllegalArgumentException("unknow denominator type of " + fractionalPercent); throw new IllegalArgumentException("unknown denominator type of " + fractionalPercent);
} }
if (numerator > 1000_000) { if (numerator > 1000_000) {

View File

@ -191,7 +191,7 @@ final class XdsLoadBalancer extends LoadBalancer {
} }
/** /**
* This is only for the subchannel that is created by the the child/fallback balancer using the * This is only for the subchannel that is created by the child/fallback balancer using the
* old API {@link LoadBalancer.Helper#createSubchannel(EquivalentAddressGroup, Attributes)} or * old API {@link LoadBalancer.Helper#createSubchannel(EquivalentAddressGroup, Attributes)} or
* {@link LoadBalancer.Helper#createSubchannel(List, Attributes)}. Otherwise, it either won't be * {@link LoadBalancer.Helper#createSubchannel(List, Attributes)}. Otherwise, it either won't be
* called or won't have any effect. * called or won't have any effect.

View File

@ -303,13 +303,6 @@ public class XdsCommsTest {
.setAddress("addr11").setPortValue(11)))) .setAddress("addr11").setPortValue(11))))
.setLoadBalancingWeight(UInt32Value.of(11)) .setLoadBalancingWeight(UInt32Value.of(11))
.build(); .build();
LbEndpoint endpoint12 = LbEndpoint.newBuilder()
.setEndpoint(Endpoint.newBuilder()
.setAddress(Address.newBuilder()
.setSocketAddress(SocketAddress.newBuilder()
.setAddress("addr12").setPortValue(12))))
.setLoadBalancingWeight(UInt32Value.of(12))
.build();
Locality localityProto2 = Locality.newBuilder() Locality localityProto2 = Locality.newBuilder()
.setRegion("region2").setZone("zone2").setSubZone("subzone2").build(); .setRegion("region2").setZone("zone2").setSubZone("subzone2").build();
LbEndpoint endpoint21 = LbEndpoint.newBuilder() LbEndpoint endpoint21 = LbEndpoint.newBuilder()
@ -319,14 +312,6 @@ public class XdsCommsTest {
.setAddress("addr21").setPortValue(21)))) .setAddress("addr21").setPortValue(21))))
.setLoadBalancingWeight(UInt32Value.of(21)) .setLoadBalancingWeight(UInt32Value.of(21))
.build(); .build();
LbEndpoint endpoint22 = LbEndpoint.newBuilder()
.setEndpoint(Endpoint.newBuilder()
.setAddress(Address.newBuilder()
.setSocketAddress(SocketAddress.newBuilder()
.setAddress("addr22").setPortValue(22))))
.setLoadBalancingWeight(UInt32Value.of(22))
.build();
DiscoveryResponse edsResponseWithDrops = DiscoveryResponse.newBuilder() DiscoveryResponse edsResponseWithDrops = DiscoveryResponse.newBuilder()
.addResources(Any.pack(ClusterLoadAssignment.newBuilder() .addResources(Any.pack(ClusterLoadAssignment.newBuilder()