Github user jburwell commented on a diff in the pull request:
    --- Diff: 
    @@ -260,7 +264,7 @@ public boolean applyLBRules(Network config, 
List<LoadBalancingRule> rules) throw
             Map<Capability, String> lbCapabilities = new HashMap<Capability, 
             // Specifies that the RoundRobin and Leastconn algorithms are 
supported for load balancing rules
    -        lbCapabilities.put(Capability.SupportedLBAlgorithms, 
    +        lbCapabilities.put(Capability.SupportedLBAlgorithms, 
    --- End diff --
    The list of strings declared on this line must be sync with the list used 
to validate the algorithm on line 237.  Therefore, please consider extracting 
this list to a constant `ImmutableSet<String>`, `SUPPORTED_ALGORITHMS` in order 
to ensure cohesion between declaration and validation.  With this change, the 
validateLBRule can be re-implemented as follows:
    public boolean validateLBRule(Network network, LoadBalancingRule rule) {
        Preconditions.checkArgument(network != null, "validateLBRule requires a 
non-null network");
        Preconditions.checkArgument(rule != null, "validateLBRule requires a 
non-null rule");
        return (canHandle(network, Service.Lb)) : 
SUPPORTED_ALGORITHMS.contains(rule.getAlgorithm()) : true;
    This line can be re-implemented as follows:

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

Reply via email to