diff options
author | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-11-18 15:11:06 +0000 |
---|---|---|
committer | antelder <antelder@13f79535-47bb-0310-9956-ffa450edef68> | 2011-11-18 15:11:06 +0000 |
commit | 14ed14d267f56ff5a89959c2afef265a162daafc (patch) | |
tree | 9768e6fd5e12277ae787eb5f2695c8370606e89f /sca-java-2.x/trunk/modules | |
parent | 6f11123620ddd23d827dddf97678de041813bd0f (diff) |
Update to avoid index out of bounds exception with 1 character operation names
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1203686 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/xml/AXIOMXMLHelper.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/xml/AXIOMXMLHelper.java b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/xml/AXIOMXMLHelper.java index bdf2deb5a5..af9b7954ce 100644 --- a/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/xml/AXIOMXMLHelper.java +++ b/sca-java-2.x/trunk/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/provider/xml/AXIOMXMLHelper.java @@ -78,7 +78,7 @@ public class AXIOMXMLHelper implements XMLHelper<OMElement> { @Override
public OMElement createWrapper(QName qname) {
// The OMElement2JAXB transformer wants the opName to be capitalized
- String opName = Character.toUpperCase(qname.getLocalPart().charAt(0)) + qname.getLocalPart().substring(1);
+ String opName = Character.toUpperCase(qname.getLocalPart().charAt(0)) + qname.getLocalPart().length() > 1 ? qname.getLocalPart().substring(1) : "";
OMElement om = factory.createOMElement(qname);
OMNamespace defaultNS = om.declareDefaultNamespace(qname.getNamespaceURI());
return factory.createOMElement(opName, defaultNS);
|