axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/message SOAPHeader.java
Date Tue, 02 Jul 2002 12:49:36 GMT
glyn        2002/07/02 05:49:35

  Modified:    java/src/org/apache/axis/message SOAPHeader.java
  Log:
  Remove duplicate code following a suggestion by John Gregg.
  
  This marginally increases the pathlength of the SAAJ methods
  examineHeaderElements and extractHeaderElements but improves
  maintainability.
  
  Revision  Changes    Path
  1.48      +3 -14     xml-axis/java/src/org/apache/axis/message/SOAPHeader.java
  
  Index: SOAPHeader.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/message/SOAPHeader.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- SOAPHeader.java	1 Jul 2002 17:40:33 -0000	1.47
  +++ SOAPHeader.java	2 Jul 2002 12:49:35 -0000	1.48
  @@ -133,20 +133,9 @@
       }
       
       private Vector findHeaderElements(String actor) {
  -        Vector results = new Vector();
  -        Iterator i = headers.iterator();
  -
  -        while (i.hasNext()) {
  -            SOAPHeaderElement header = (SOAPHeaderElement)i.next();
  -            String headerActor = header.getActor();
  -            // Allow NEXT's and any headers with matching actor
  -            if (Constants.URI_SOAP11_NEXT_ACTOR.equals(headerActor) ||
  -                (actor == headerActor) || 
  -                (actor != null && actor.equals(headerActor))) {
  -                results.add(header);
  -            }
  -        }
  -        return results;
  +        ArrayList actors = new ArrayList();
  +        actors.add(actor);
  +        return getHeadersByActor(actors);
       }
   
       public Iterator examineHeaderElements(String actor) {
  
  
  

Mime
View raw message