You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by "Aled Sage (JIRA)" <ji...@apache.org> on 2016/03/14 11:09:33 UTC
[jira] [Created] (BROOKLYN-236) Catalog version ignores trailing
zero: 1.10 treated as 1.1
Aled Sage created BROOKLYN-236:
----------------------------------
Summary: Catalog version ignores trailing zero: 1.10 treated as 1.1
Key: BROOKLYN-236
URL: https://issues.apache.org/jira/browse/BROOKLYN-236
Project: Brooklyn
Issue Type: Bug
Reporter: Aled Sage
With Brooklyn 0.9.0-SNAPSHOT.
Add the example catalog item below - once with version {{1.2}} and once with versoin {{1.10}}. When you look in the catalog, it shows versions 1.1 and 1.2 (instead of 1.10 and 1.2).
If you put the version number in quotes (e.g. {{version: "1.10"}}) then it works as expected.
Presumably the problem is in the YAML parsing: it interprets the value as a double rather than a String, so throws away the zero at the end.
{noformat}
brooklyn.catalog:
id: SimpleExample
version: 1.10
displayName: SimpleExample
itemType: template
item:
services:
- type: org.apache.brooklyn.entity.stock.BasicApplication
{noformat}
Should we:
* change all our examples to put the version in quotes, so it is a string?
* try to parse this YAML value differently (but then we can't just rely on the normal YAML parsing of {{org.yaml.snakeyaml.Yaml().loadAll(yaml}}?)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)