grpclb,xds: fix lint warnings (#6666)

This commit is contained in:
Jihun Cho 2020-01-31 11:32:26 -08:00 committed by GitHub
parent 66f08c71b1
commit 307f7d0e09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -208,7 +208,6 @@ class GrpclbLoadBalancer extends LoadBalancer {
* 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<String, ?> obj, String key) {
assert key != null;

View File

@ -680,7 +680,7 @@ final class XdsClientImpl extends XdsClient {
List<Route> routes = targetVirtualHost.getRoutesList();
if (!routes.isEmpty()) {
Route route = routes.get(routes.size() - 1);
if (route.getMatch().getPrefix().equals("")) {
if (route.getMatch().getPrefix().isEmpty()) {
if (route.hasRoute()) {
return route.getRoute().getCluster();
}