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

    https://github.com/apache/brooklyn-server/pull/319#discussion_r83863239
  
    --- Diff: 
utils/common/src/main/java/org/apache/brooklyn/util/net/Networking.java ---
    @@ -241,7 +241,12 @@ public static void checkPortsValid(Map<?, ?> ports) {
         public static RangeSet<Integer> portRulesToRanges(Collection<String> 
portRules) {
             RangeSet<Integer> result = TreeRangeSet.create();
             for (String portRule : portRules) {
    -            if (portRule.contains("-")) {
    +            if (portRule.isEmpty()) {
    +                throw new IllegalArgumentException("portRule shouldn't be 
empty");
    +            }
    +            if (portRule.equals("-1")) {
    +                result.add(Range.closed(Integer.parseInt("-1"), 
Integer.parseInt("-1")));
    --- End diff --
    
    Is this necessary? Strikes me as surprising and I can't see where it's 
required in these changes.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to