diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-11-14 14:22:19 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-11-14 14:22:19 +0000 |
commit | d355f2a16ca083e9ab5f655c5f6807816e5c265d (patch) | |
tree | 87f3a08a09d5ad6b919040e0a1532a9f33d4c432 | |
parent | c53c843b6fa38adcaadabfe8bce57a0d13943ca3 (diff) |
Add extra check for zero child elements when processing the OMElement wrapper.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1201718 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | sca-java-2.x/trunk/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandler.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandler.java b/sca-java-2.x/trunk/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandler.java index 0c657756a0..09fc0a311b 100644 --- a/sca-java-2.x/trunk/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandler.java +++ b/sca-java-2.x/trunk/modules/databinding-axiom/src/main/java/org/apache/tuscany/sca/databinding/axiom/OMElementWrapperHandler.java @@ -231,6 +231,14 @@ public class OMElementWrapperHandler implements WrapperHandler<OMElement> { private List<Object> getInvalidChildren(List<List<OMElement>> groupedElementList, List<ElementInfo> childElements) { List<Object> retVal = new ArrayList<Object>(); + // if this is an operation without arguments then it seems that + // the groupedElementList can have a list with an empty list in it while + // the child elements list is empty. This leads to an IndexOutOfBounds when + // trying to de-reference childElements. So check for this now + if (childElements.size() == 0){ + return retVal; + } + // Since not all the ElementInfo(s) will be represented, (if some elements don't appear as children // of the wrapper payload, we need to loop through the schema for (int index=0; index < groupedElementList.size(); index++) { |