ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davidills...@apache.org
Subject svn commit: r585910 - /webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
Date Thu, 18 Oct 2007 09:52:54 GMT
Author: davidillsley
Date: Thu Oct 18 02:52:53 2007
New Revision: 585910

URL: http://svn.apache.org/viewvc?rev=585910&view=rev
Log:
Remove redundant code

Modified:
    webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java

Modified: webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java?rev=585910&r1=585909&r2=585910&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
(original)
+++ webservices/axis2/trunk/java/modules/addressing/src/org/apache/axis2/handlers/addressing/AddressingOutHandler.java
Thu Oct 18 02:52:53 2007
@@ -140,25 +140,19 @@
             envelope = mc.getEnvelope();
             factory = (SOAPFactory)envelope.getOMFactory();
 
-            header = envelope.getHeader();
-
-            // if there is no soap header in the envelope being processed, add one.
-            if (header == null) {
-                header = factory.createSOAPHeader(envelope);
-            }
-
             messageContextOptions = messageContext.getOptions();
 
             addressingNamespace =
                     (isSubmissionNamespace ? Submission.WSA_NAMESPACE : Final.WSA_NAMESPACE);
 
+            header = envelope.getHeader();
             // if there is no soap header in the envelope being processed, add one.
             if (header == null) {
             	header = factory.createSOAPHeader(envelope);
             }else{
             	ArrayList addressingHeaders = header.getHeaderBlocksWithNSURI(addressingNamespace);
             	if(addressingHeaders!=null && !addressingHeaders.isEmpty()){
-            		existingWSAHeaders = new ArrayList();
+            		existingWSAHeaders = new ArrayList(addressingHeaders.size());
             		for(Iterator iter=addressingHeaders.iterator();iter.hasNext();){
             			OMElement oe = (OMElement)iter.next();
             			existingWSAHeaders.add(oe.getLocalName());



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message