jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds-labs-google] Convert GoogleComputeEngine to AutoValue + general cleanup. (#73)
Date Mon, 03 Nov 2014 21:09:50 GMT
>  
> -      for (Rule rule : fw.getAllowed()) {
> -         if (!rule.getPorts().isEmpty()) {
> -            for (Range<Integer> r : rule.getPorts().asRanges()) {
> -               IpPermission.Builder builder = populateBuilder(fw, rule.getIpProtocol());
> -               builder.fromPort(r.lowerEndpoint());
> -               builder.toPort(r.upperEndpoint());
> -               setBuilder.add(builder.build());
> +      for (Rule rule : fw.allowed()) {
> +         if (rule.ports() != null && !rule.ports().isEmpty()) {

[minor] Avoiding Guava here, otherwise use `nullToEmpty` or so?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-google/pull/73/files#r19764251
Mime
View raw message