mirror of https://github.com/grpc/grpc-java.git
grpclb,xds: fix lint warnings (#6666)
This commit is contained in:
parent
66f08c71b1
commit
307f7d0e09
|
|
@ -208,7 +208,6 @@ class GrpclbLoadBalancer extends LoadBalancer {
|
||||||
* Gets a list from an object for the given key. Copy of
|
* Gets a list from an object for the given key. Copy of
|
||||||
* {@link io.grpc.internal.ServiceConfigUtil#getList}.
|
* {@link io.grpc.internal.ServiceConfigUtil#getList}.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
@Nullable
|
@Nullable
|
||||||
private static List<?> getList(Map<String, ?> obj, String key) {
|
private static List<?> getList(Map<String, ?> obj, String key) {
|
||||||
assert key != null;
|
assert key != null;
|
||||||
|
|
|
||||||
|
|
@ -680,7 +680,7 @@ final class XdsClientImpl extends XdsClient {
|
||||||
List<Route> routes = targetVirtualHost.getRoutesList();
|
List<Route> routes = targetVirtualHost.getRoutesList();
|
||||||
if (!routes.isEmpty()) {
|
if (!routes.isEmpty()) {
|
||||||
Route route = routes.get(routes.size() - 1);
|
Route route = routes.get(routes.size() - 1);
|
||||||
if (route.getMatch().getPrefix().equals("")) {
|
if (route.getMatch().getPrefix().isEmpty()) {
|
||||||
if (route.hasRoute()) {
|
if (route.hasRoute()) {
|
||||||
return route.getRoute().getCluster();
|
return route.getRoute().getCluster();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue