You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gd...@apache.org on 2004/10/05 02:10:38 UTC
cvs commit: ws-axis/java/src/org/apache/axis/message SOAPBody.java
gdaniels 2004/10/04 17:10:38
Modified: java/src/org/apache/axis/message SOAPBody.java
Log:
Prevent IndexOutOfBoundsException.
Revision Changes Path
1.55 +3 -3 ws-axis/java/src/org/apache/axis/message/SOAPBody.java
Index: SOAPBody.java
===================================================================
RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/message/SOAPBody.java,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- SOAPBody.java 8 Jul 2004 14:13:28 -0000 1.54
+++ SOAPBody.java 5 Oct 2004 00:10:38 -0000 1.55
@@ -157,9 +157,9 @@
SOAPBodyElement getFirstBody() throws AxisFault
{
- List bodyElements = getChildren();
- return (bodyElements == null) ?
- null : (SOAPBodyElement)bodyElements.get(0);
+ if (!hasChildNodes())
+ return null;
+ return (SOAPBodyElement)getChildren().get(0);
}
void addBodyElement(SOAPBodyElement element)