Github user aledsage commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/713#discussion_r119322416
  
    --- Diff: 
locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
 ---
    @@ -936,8 +937,7 @@ protected MachineLocation obtainOnce(ConfigBag setup) 
throws NoMachinesAvailable
                         } else {
                             LOG.warn("Using DEPRECATED flag OPEN_IPTABLES 
(will not be supported in future versions) for {} at {}", machineLocation, 
this);
     
    -                        @SuppressWarnings("unchecked")
    -                        Iterable<Integer> inboundPorts = 
(Iterable<Integer>) setup.get(INBOUND_PORTS);
    +                        Iterable<Integer> inboundPorts = 
Ints.asList(template.getOptions().getInboundPorts());
     
                             if (inboundPorts == null || 
Iterables.isEmpty(inboundPorts)) {
    --- End diff --
    
    Very minor: we could now get rid of the null check, given `Ints.asList()` 
(and `template.getOptions().getInboundPorts()`) will never return null.
    
    Also, we don't need to convert it to an `Iterable<Integer>`. We could leave 
it as a `int[]`, and change the line below to `inboundPorts.length == 0`. No 
strong feelings.
    
    But will merge as-is.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to