Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 72873 invoked from network); 28 Apr 2009 23:33:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Apr 2009 23:33:51 -0000 Received: (qmail 88848 invoked by uid 500); 28 Apr 2009 23:33:50 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 88791 invoked by uid 500); 28 Apr 2009 23:33:50 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 88782 invoked by uid 99); 28 Apr 2009 23:33:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2009 23:33:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2009 23:33:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C65E8238893B; Tue, 28 Apr 2009 23:33:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r769590 - in /geronimo/sandbox/blueprint/blueprint-core/src: main/java/org/apache/geronimo/blueprint/context/Parser.java test/java/org/apache/geronimo/blueprint/WiringTest.java test/resources/test-wiring.xml Date: Tue, 28 Apr 2009 23:33:29 -0000 To: scm@geronimo.apache.org From: gawor@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090428233329.C65E8238893B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: gawor Date: Tue Apr 28 23:33:29 2009 New Revision: 769590 URL: http://svn.apache.org/viewvc?rev=769590&view=rev Log: support for inlined prop values Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/WiringTest.java geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-wiring.xml Modified: geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java?rev=769590&r1=769589&r2=769590&view=diff ============================================================================== --- geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java (original) +++ geronimo/sandbox/blueprint/blueprint-core/src/main/java/org/apache/geronimo/blueprint/context/Parser.java Tue Apr 28 23:33:29 2009 @@ -651,11 +651,13 @@ if (!element.hasAttribute(KEY_ATTRIBUTE)) { throw new ComponentDefinitionException(KEY_ATTRIBUTE + " attribute is required"); } - if (!element.hasAttribute(VALUE_ATTRIBUTE)) { - throw new ComponentDefinitionException(VALUE_ATTRIBUTE + " attribute is required"); + String value = null; + if (element.hasAttribute(VALUE_ATTRIBUTE)) { + value = element.getAttribute(VALUE_ATTRIBUTE); + } else { + value = getTextValue(element); } String key = element.getAttribute(KEY_ATTRIBUTE); - String value = element.getAttribute(VALUE_ATTRIBUTE); return new MapEntryImpl(new ValueMetadataImpl(key, String.class.getName()), new ValueMetadataImpl(value, String.class.getName())); } Modified: geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/WiringTest.java URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/WiringTest.java?rev=769590&r1=769589&r2=769590&view=diff ============================================================================== --- geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/WiringTest.java (original) +++ geronimo/sandbox/blueprint/blueprint-core/src/test/java/org/apache/geronimo/blueprint/WiringTest.java Tue Apr 28 23:33:29 2009 @@ -90,6 +90,7 @@ assertNotNull(pojoa.getProps()); assertEquals("value1", pojoa.getProps().get("key1")); assertEquals("value2", pojoa.getProps().get("2")); + assertEquals("bar", pojoa.getProps().get("foo")); assertNotNull(pojoa.getNumber()); assertEquals(new BigInteger("10"), pojoa.getNumber()); Modified: geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-wiring.xml URL: http://svn.apache.org/viewvc/geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-wiring.xml?rev=769590&r1=769589&r2=769590&view=diff ============================================================================== --- geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-wiring.xml (original) +++ geronimo/sandbox/blueprint/blueprint-core/src/test/resources/test-wiring.xml Tue Apr 28 23:33:29 2009 @@ -56,6 +56,7 @@ + bar