Return-Path: X-Original-To: apmail-aries-dev-archive@www.apache.org Delivered-To: apmail-aries-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B8C0FD7D6 for ; Tue, 17 Jul 2012 16:25:36 +0000 (UTC) Received: (qmail 32662 invoked by uid 500); 17 Jul 2012 16:25:35 -0000 Delivered-To: apmail-aries-dev-archive@aries.apache.org Received: (qmail 32623 invoked by uid 500); 17 Jul 2012 16:25:35 -0000 Mailing-List: contact dev-help@aries.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aries.apache.org Delivered-To: mailing list dev@aries.apache.org Received: (qmail 32296 invoked by uid 99); 17 Jul 2012 16:25:35 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Jul 2012 16:25:35 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id C65BE142856 for ; Tue, 17 Jul 2012 16:25:34 +0000 (UTC) Date: Tue, 17 Jul 2012 16:25:34 +0000 (UTC) From: "Holly Cummins (JIRA)" To: dev@aries.apache.org Message-ID: <1008549789.64498.1342542334814.JavaMail.jiratomcat@issues-vm> In-Reply-To: <663721126.55583.1342371648565.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Resolved] (ARIES-874) Blueprint should treat "value-type" on a map as a default, not a requirement MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ 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 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