From 683a3ee1a792e9e80eb8359328cb388056cd85a0 Mon Sep 17 00:00:00 2001 From: Aled Sage Date: Wed, 19 Apr 2017 13:40:37 +0100 Subject: [PATCH] Java config docs: default-value should be immutable --- guide/blueprints/java/common-usage.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guide/blueprints/java/common-usage.md b/guide/blueprints/java/common-usage.md index ccafd9b6..2c9d91b7 100644 --- a/guide/blueprints/java/common-usage.md +++ b/guide/blueprints/java/common-usage.md @@ -39,6 +39,10 @@ public static final ConfigKey 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