Add parentheses to force correct evaluation

git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1235257 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
antelder 2012-01-24 14:10:54 +00:00
parent 68afedb60b
commit 53121100f0

View file

@ -78,7 +78,7 @@ public class AXIOMXMLHelper implements XMLHelper<OMElement> {
@Override @Override
public OMElement createWrapper(QName qname) { public OMElement createWrapper(QName qname) {
// The OMElement2JAXB transformer wants the opName to be capitalized // The OMElement2JAXB transformer wants the opName to be capitalized
String opName = Character.toUpperCase(qname.getLocalPart().charAt(0)) + qname.getLocalPart().length() > 1 ? 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); OMElement om = factory.createOMElement(qname);
OMNamespace defaultNS = om.declareDefaultNamespace(qname.getNamespaceURI()); OMNamespace defaultNS = om.declareDefaultNamespace(qname.getNamespaceURI());
return factory.createOMElement(opName, defaultNS); return factory.createOMElement(opName, defaultNS);