aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Holly Cummins (JIRA)" <>
Subject [jira] [Resolved] (ARIES-874) Blueprint should treat "value-type" on a map as a default, not a requirement
Date Tue, 17 Jul 2012 16:25:34 GMT


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:
>             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
>  "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:!default.jspa
For more information on JIRA, see:


View raw message