Skip to content

Commit

Permalink
AS7-5369 Allow direct text value in parameter element.
Browse files Browse the repository at this point in the history
  • Loading branch information
alesj authored and bstansberry committed Aug 14, 2012
1 parent 5990d07 commit 2cd952c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@

package org.jboss.as.pojo.descriptor;

import static org.jboss.as.controller.parsing.ParseUtils.missingRequired;
import static org.jboss.as.controller.parsing.ParseUtils.unexpectedAttribute;
import static org.jboss.as.controller.parsing.ParseUtils.unexpectedElement;

import java.util.ArrayList;
import java.util.EnumSet;
import java.util.HashMap;
Expand All @@ -44,6 +40,10 @@
import org.jboss.staxmapper.XMLElementReader;
import org.jboss.staxmapper.XMLExtendedStreamReader;

import static org.jboss.as.controller.parsing.ParseUtils.missingRequired;
import static org.jboss.as.controller.parsing.ParseUtils.unexpectedAttribute;
import static org.jboss.as.controller.parsing.ParseUtils.unexpectedElement;

/**
* Parse Microcontainer jboss-beans.xml.
*
Expand Down Expand Up @@ -617,6 +617,11 @@ private ValueConfig parseParameter(final XMLExtendedStreamReader reader) throws

while (reader.hasNext()) {
switch (reader.next()) {
case CHARACTERS:
final StringValueConfig svc = new StringValueConfig();
svc.setValue(reader.getText());
valueConfig = svc;
break;
case END_ELEMENT:
if (valueConfig == null)
throw new XMLStreamException(PojoMessages.MESSAGES.missingValue(), reader.getLocation());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@
<depends>Blocker</depends>
</bean>

<bean name="ParamTextValue" class="org.jboss.as.test.integration.pojo.support.TInjectee">
<constructor>
<parameter>Wazup, </parameter>
</constructor>
<install method="sayHello">
<parameter><value>POJO subsystem!</value></parameter>
</install>
</bean>

<bean name="Blocker" class="org.jboss.as.test.integration.pojo.support.TInjectee"/>

<bean name="B2" class="org.jboss.as.test.integration.pojo.support.TBean">
Expand Down

0 comments on commit 2cd952c

Please sign in to comment.