From 2cd952c7174180794aae7e61b2d96adf38f57fe5 Mon Sep 17 00:00:00 2001 From: Ales Justin Date: Tue, 14 Aug 2012 16:31:15 +0200 Subject: [PATCH] AS7-5369 Allow direct text value in parameter element. --- .../KernelDeploymentXmlDescriptorParser.java | 13 +++++++++---- .../integration/pojo/test/simple-jboss-beans.xml | 9 +++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/pojo/src/main/java/org/jboss/as/pojo/descriptor/KernelDeploymentXmlDescriptorParser.java b/pojo/src/main/java/org/jboss/as/pojo/descriptor/KernelDeploymentXmlDescriptorParser.java index 97690f23025c..8eec8baf33b3 100644 --- a/pojo/src/main/java/org/jboss/as/pojo/descriptor/KernelDeploymentXmlDescriptorParser.java +++ b/pojo/src/main/java/org/jboss/as/pojo/descriptor/KernelDeploymentXmlDescriptorParser.java @@ -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; @@ -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. * @@ -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()); diff --git a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/pojo/test/simple-jboss-beans.xml b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/pojo/test/simple-jboss-beans.xml index ea4fc397c8ec..8aac62e38a9a 100644 --- a/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/pojo/test/simple-jboss-beans.xml +++ b/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/pojo/test/simple-jboss-beans.xml @@ -51,6 +51,15 @@ Blocker + + + Wazup, + + + POJO subsystem! + + +