axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/message SOAPBody.java
Date Tue, 05 Oct 2004 00:10:38 GMT
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) 
  
  
  

Mime
View raw message