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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions guide/blueprints/java/common-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public static final ConfigKey<String> ROOT_WAR = new ConfigKeys.newStringConfigK
"WAR file to deploy as the ROOT, as URL (supporting file: and classpath: prefixes)");
{% endhighlight %}

If supplying a default value, it is important that this be immutable. Otherwise, it risks users
of the blueprint modifying the default value, which would affect blueprints that are subsequently
deployed.

One can optionally define a `@SetFromFlag("war")`. This defines a short-hand for configuring the
entity. However, it should be used with caution - when using configuration set on a parent entity
(and thus inherited), the `@SetFromFlag` short-form names are not checked. The long form defined
Expand Down