Github user sjcorbett commented on a diff in the pull request:
    --- Diff: 
utils/common/src/main/java/org/apache/brooklyn/util/net/ ---
    @@ -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 
    +            }
    +            if (portRule.equals("-1")) {
    +                result.add(Range.closed(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 or file a JIRA ticket
with INFRA.

Reply via email to