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

    https://github.com/apache/brooklyn-server/pull/276#discussion_r72585644
  
    --- Diff: 
core/src/main/java/org/apache/brooklyn/util/core/BrooklynNetworkUtils.java ---
    @@ -39,4 +43,22 @@ public static InetAddress getLocalhostInetAddress() {
                     Networking.getLocalHost()), InetAddress.class);
         }
     
    +    // TODO it does not add adjacent intervals: {[22, 22], [23, 23]} is 
not merged to {[22, 23]}
    +    public static RangeSet<Integer> portRulesToRanges(Collection<String> 
portRules) {
    +        RangeSet<Integer> result = TreeRangeSet.create();
    +        for (String portRule : portRules) {
    +            if (portRule.contains("-")) {
    +                String[] fromTo = portRule.split("-");
    +                assert fromTo.length == 2;
    --- End diff --
    
    Assertions are disabled by default, use `Preconditions.checkState`


---
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