[ https://issues.apache.org/jira/browse/ARIES-874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Holly Cummins resolved ARIES-874. --------------------------------- Resolution: Fixed Fix Version/s: 1.0 > Blueprint should treat "value-type" on a map as a default, not a requirement > ---------------------------------------------------------------------------- > > Key: ARIES-874 > URL: https://issues.apache.org/jira/browse/ARIES-874 > Project: Aries > Issue Type: Bug > Components: Blueprint > Affects Versions: blueprint-0.4.0 > Reporter: Holly Cummins > Assignee: Holly Cummins > Priority: Minor > Fix For: 1.0 > > > We have six failures in the OSGi blueprint compliance tests with errors > similar to the following: > "Unable to convert value 1.0 to type java.lang.Boolean" > I've done a bit of digging and the problem happens when a <map> in a > blueprint.xml specifies a value-type. Since ARIES-703, the MapRecipe converts > every value in the collection to the value-type. However, the specification > describes the value-type as follows: "Optional default type for values." That > is, the value-type is only a default, and individual entries in the map can > override the type. > We're seeing failures because we're trying to convert values which are > declared as double to the default type for the map, boolean. > I've updated MapRecipe to check if there is a value specified on the type, > and use that for the conversion where possible. What I ended up with is > fairly similar to what CollectionRecipe already does, reassuringly. I've also > done the same thing for key-types. Finally, our tests for constructing maps > were commented out, so I've re-enabled them and added some extra ones to test > these more complex scenarios. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira