You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by al...@apache.org on 2016/11/07 12:11:12 UTC

[1/2] brooklyn-docs git commit: document change to default conversion behaviour

Repository: brooklyn-docs
Updated Branches:
  refs/heads/master adf562c36 -> 608b87d61


document change to default conversion behaviour


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/4d3ebae1
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/4d3ebae1
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/4d3ebae1

Branch: refs/heads/master
Commit: 4d3ebae10bd675d163e53dd5c30d3e497143f9f8
Parents: 25a6f59
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Mon Nov 7 11:27:23 2016 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Mon Nov 7 11:27:23 2016 +0000

----------------------------------------------------------------------
 guide/misc/release-notes.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/4d3ebae1/guide/misc/release-notes.md
----------------------------------------------------------------------
diff --git a/guide/misc/release-notes.md b/guide/misc/release-notes.md
index 2fb7d36..e196c47 100644
--- a/guide/misc/release-notes.md
+++ b/guide/misc/release-notes.md
@@ -21,5 +21,22 @@ Changes since 0.9.0:
 
 1. [minor] `ClassCoercionException` has moved package. The old one was deleted to prevent errors inadvertently trying to catch it.
 
+2. [minor] Default config key values are now coerced to the right type when accessed.
+Previously coercion only applied to values set, so if a default value was accessed, the caller would get the 
+value and type of the default value, not coerced to the type of the config key.
+This was inconsistent with cases where a value is set for the config key, as callers in that case will get the
+value coerced to the type of the config key. This was a bug as callers should always be able to expect
+the config value to be of the declared type, consistently across default values and explicitly set values.
+
+    As an example, if a config key is typed (e.g. `port`) and a caller uses code such as `$brooklyn:config` to access
+that value, previously they would see the numeric value if the value comes from a default;
+if that is what is being expected it is an error as a JSON map for `PortRange` would be returned if a config value is set,
+but the erroneous usage might not have been noticed if the port only ever came from a default value. 
+The fix in this case is to use `$brooklyn:attributeWhenReady` if the caller wants the actual value selected from the range
+(through port inferencing done e.g. in `SoftwareProcess` entities),
+or to declare the sensor of type `int` if they do not want port ranges and inferencing to be supported.
+
+
+
 For changes in prior versions, please refer to the release notes for 
 [0.9.0]({{ site.path.v }}/0.9.0/misc/release-notes.html).


[2/2] brooklyn-docs git commit: This closes #121

Posted by al...@apache.org.
This closes #121


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/608b87d6
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/608b87d6
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/608b87d6

Branch: refs/heads/master
Commit: 608b87d61c1375f1d54dd9626a949410da85cfed
Parents: adf562c 4d3ebae
Author: Aled Sage <al...@gmail.com>
Authored: Mon Nov 7 12:10:35 2016 +0000
Committer: Aled Sage <al...@gmail.com>
Committed: Mon Nov 7 12:10:35 2016 +0000

----------------------------------------------------------------------
 guide/misc/release-notes.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------