Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java config docs: default-value should be immutable #172

Merged

Conversation

aledsage
Copy link
Contributor

No description provided.

@aledsage aledsage force-pushed the fix-config-defaultVal-must-be-immutable branch from 1bdfa62 to 683a3ee Compare April 19, 2017 12:46
@nakomis
Copy link
Contributor

nakomis commented Apr 19, 2017

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.

@drigodwin
Copy link
Member

Thanks for the addition @aledsage, do you think this should replace @bostko's #171?

@geomacy
Copy link
Contributor

geomacy commented Apr 21, 2017

LGTM, merging.

@asfgit asfgit merged commit 683a3ee into apache:master Apr 21, 2017
asfgit pushed a commit that referenced this pull request Apr 21, 2017
Java config docs: default-value should be immutable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants