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
This commit is contained in:
parent
6f11123620
commit
14ed14d267
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue