> +   }
> +
> +   @Override
> +   public boolean supportsPortRangesForGroups() {
> +      return true;
> +   }
> +
> +   private SecurityGroup groupForTagsInNetwork(Network nw, final Set 
> <String> tags) {
> +      ListOptions opts = new Builder().filter("network eq .*/" + 
> nw.getName());
> +      Set<Firewall> fws = 
> api.getFirewallApiForProject(userProject.get()).list(opts).concat()
> +              .filter(new Predicate<Firewall>() {
> +                 @Override
> +                 public boolean apply(final Firewall input) {
> +                    // If any of the targetTags on the firewall apply or the 
> firewall has no target tags...
> +                    return Iterables.any(input.getTargetTags(), 
> Predicates.in(tags))
> +                            || 
> Predicates.equalTo(0).apply(input.getTargetTags().size());

Would plain old
```
return (input.getTargetTags().isEmpty() || 
input.getTargetTags().contains(tags)); 
```
work here? Just in terms or readability...

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/5/files#r7380721

Reply via email to