Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 55879 invoked from network); 5 Oct 2004 00:10:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 5 Oct 2004 00:10:56 -0000 Received: (qmail 20294 invoked by uid 500); 5 Oct 2004 00:10:40 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 20258 invoked by uid 500); 5 Oct 2004 00:10:39 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 20244 invoked by uid 99); 5 Oct 2004 00:10:39 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 04 Oct 2004 17:10:39 -0700 Received: (qmail 55796 invoked by uid 1144); 5 Oct 2004 00:10:38 -0000 Date: 5 Oct 2004 00:10:38 -0000 Message-ID: <20041005001038.55795.qmail@minotaur.apache.org> From: gdaniels@apache.org To: ws-axis-cvs@apache.org Subject: cvs commit: ws-axis/java/src/org/apache/axis/message SOAPBody.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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)