brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aled Sage (JIRA)" <>
Subject [jira] [Created] (BROOKLYN-236) Catalog version ignores trailing zero: 1.10 treated as 1.1
Date Mon, 14 Mar 2016 10:09:33 GMT
Aled Sage created BROOKLYN-236:

             Summary: Catalog version ignores trailing zero: 1.10 treated as 1.1
                 Key: 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.

  id: SimpleExample
  version: 1.10
  displayName: SimpleExample
  itemType: template

    - type: org.apache.brooklyn.entity.stock.BasicApplication

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

View raw message