generics warning and declare a List variable by the interface rather than implementation type

javadoc fixes
This commit is contained in:
Matt Benson
2015-07-09 17:19:09 -05:00
committed by Spencer Gibb
parent 253103a99a
commit a80af8cf13
3 changed files with 4 additions and 4 deletions

View File

@@ -38,7 +38,7 @@ import com.netflix.loadbalancer.ServerList;
import com.netflix.loadbalancer.ServerListFilter;
/**
* Preprocessor that configures defaults for eureka-discovered ribbon clients. Such as:
* Preprocessor that configures defaults for Consul-discovered ribbon clients. Such as:
* <code>@zone</code>, NIWSServerListClassName, DeploymentContextBasedVipAddresses,
* NFLoadBalancerRuleClassName, NIWSServerListFilterClassName and more
*

View File

@@ -64,9 +64,9 @@ public class ConsulServerList extends AbstractServerList<ConsulServer> {
Response<List<CatalogService>> response = client.getCatalogService(
this.serviceId, QueryParams.DEFAULT);
if (response.getValue() == null || response.getValue().isEmpty()) {
return Collections.EMPTY_LIST;
return Collections.emptyList();
}
ArrayList<ConsulServer> servers = new ArrayList<>();
List<ConsulServer> servers = new ArrayList<>();
for (CatalogService service : response.getValue()) {
servers.add(new ConsulServer(service, properties.isPreferIpAddress()));
}

View File

@@ -30,7 +30,7 @@ import com.netflix.loadbalancer.ServerListFilter;
* a member of the serf gossip pool. The serf status (alive/failed/etc) is reflected in 2
* consul APIs: in the agent API and in the catalog API. We prefer the agent API because
* it is most up to date (or perhaps we should intersect them and pick members that are
* liv in both).
* live in both).
* @author nicu marasoiu on 10.03.2015.
*/
public class AliveServerListFilter implements ServerListFilter<Server> {