axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r733348 - /webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPMessageImpl.java
Date Sat, 10 Jan 2009 20:48:05 GMT
Author: veithen
Date: Sat Jan 10 12:48:05 2009
New Revision: 733348

URL: http://svn.apache.org/viewvc?rev=733348&view=rev
Log:
Removed unreachable/dead code:
* mimeHeaders is a private attribute initialized to null => in the constructor mimeHeaders
!= null will never be true
* as a consequence, contentType will never have a charset parameter => no need to call
initCharsetEncodingFromContentType

Modified:
    webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPMessageImpl.java

Modified: webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPMessageImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPMessageImpl.java?rev=733348&r1=733347&r2=733348&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPMessageImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPMessageImpl.java
Sat Jan 10 12:48:05 2009
@@ -62,24 +62,13 @@
     private boolean saveRequired;
 
     public SOAPMessageImpl(SOAPEnvelopeImpl soapEnvelope) {
-        String contentType = null;
-
-
-        if (mimeHeaders != null) {
-            String contentTypes[] = mimeHeaders.getHeader(HTTPConstants.CONTENT_TYPE);
-            contentType = (contentTypes != null) ? contentTypes[0] : null;
-        } else {
-            this.mimeHeaders = new MimeHeaders();
-            if (soapEnvelope.getOMFactory() instanceof SOAP11Factory) {
-                contentType = HTTPConstants.MEDIA_TYPE_TEXT_XML;
-                this.mimeHeaders.addHeader("content-type", contentType);
-            } else if (soapEnvelope.getOMFactory() instanceof SOAP12Factory) {
-                contentType = HTTPConstants.MEDIA_TYPE_APPLICATION_SOAP_XML;
-                this.mimeHeaders.addHeader("content-type", contentType);
-            }
+        this.mimeHeaders = new MimeHeaders();
+        if (soapEnvelope.getOMFactory() instanceof SOAP11Factory) {
+            this.mimeHeaders.addHeader("content-type", HTTPConstants.MEDIA_TYPE_TEXT_XML);
+        } else if (soapEnvelope.getOMFactory() instanceof SOAP12Factory) {
+            this.mimeHeaders.addHeader("content-type",
+                    HTTPConstants.MEDIA_TYPE_APPLICATION_SOAP_XML);
         }
-
-        initCharsetEncodingFromContentType(contentType);
         soapPart = new SOAPPartImpl(this, soapEnvelope);
     }
 



Mime
View raw message