You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by th...@apache.org on 2005/09/21 15:11:15 UTC

svn commit: r290689 - /webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/MIMEHelper.java

Author: thilina
Date: Wed Sep 21 06:11:09 2005
New Revision: 290689

URL: http://svn.apache.org/viewcvs?rev=290689&view=rev
Log:
removing the possible null pointer generating code
Now MIMEHelper will give meaningfull exceptions rather than throwing null pointer when type parameter is missing

Modified:
    webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/MIMEHelper.java

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/MIMEHelper.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/MIMEHelper.java?rev=290689&r1=290688&r2=290689&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/MIMEHelper.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/attachments/MIMEHelper.java Wed Sep 21 06:11:09 2005
@@ -169,9 +169,9 @@
     public String getAttachmentSpecType() {
         if (this.applicationType == null) {
             applicationType = contentType.getParameter("type");
-            if (applicationType.equalsIgnoreCase(MTOMConstants.MTOM_TYPE)) {
+            if ((MTOMConstants.MTOM_TYPE).equalsIgnoreCase(applicationType)) {
                 this.applicationType = MTOMConstants.MTOM_TYPE;
-            } else if (applicationType.equalsIgnoreCase(MTOMConstants.SWA_TYPE)) {
+            } else if ((MTOMConstants.SWA_TYPE).equalsIgnoreCase(applicationType)) {
                 this.applicationType = MTOMConstants.SWA_TYPE;
             } else {
                 throw new OMException(