brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nakomis <...@git.apache.org>
Subject [GitHub] brooklyn-docs issue #172: Java config docs: default-value should be immutabl...
Date Wed, 19 Apr 2017 12:50:13 GMT
Github user nakomis commented on the issue:

    https://github.com/apache/brooklyn-docs/pull/172
  
    I think it would be worth changing the wording to make it clearer that you're not talking
about the user *setting* the default to a new value, but instead modifying the underlying
object, i.e. the risk isn't that they might say `myConfigKey.setDefaultValue(newValue)`, but
rather `myListConfigKey.getDefaultValue().add(foo)`. Perhaps something like:
    
    If supplying an object as a default value, it is important that the object is immutable.
Otherwise, it risks users of the blueprint modifying the underlying object, which would affect
blueprints that are subsequently deployed.


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