generics warning and declare a List variable by the interface rather than implementation type
javadoc fixes
This commit is contained in:
committed by
Spencer Gibb
parent
253103a99a
commit
a80af8cf13
@@ -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
|
||||
*
|
||||
|
||||
@@ -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()));
|
||||
}
|
||||
|
||||
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user