brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nakomis <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Fixes issue where port was not be...
Date Thu, 25 Jun 2015 12:20:29 GMT
Github user nakomis commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/717#discussion_r33248227
  
    --- Diff: software/base/src/main/java/brooklyn/entity/basic/SoftwareProcessImpl.java ---
    @@ -456,6 +456,9 @@ protected final void callStartHooks() {}
                     Object value = getConfig(k);
                     if (value instanceof Integer){
                         ports.add((Integer)value);
    +                } else if (PortRange.class.isAssignableFrom(value.getClass())) {
    --- End diff --
    
    452 checks the class of the key's type, then checks assignability of the value from getConfig.
If you use `entityspec.configure(Attributes.HTTP_PORT, "9999+")` then it will be picked up
on line 452, however if you use `entityspec.configure("http.port"), which is effectively what
happens when you put "http.port" in the YAML, then it creates a new `ConfigKey<Object>`
which is not picked up on line 452


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

Mime
View raw message