You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by sc...@apache.org on 2007/08/14 23:21:31 UTC

svn commit: r565917 - /webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Attachments.java

Author: scheu
Date: Tue Aug 14 14:21:30 2007
New Revision: 565917

URL: http://svn.apache.org/viewvc?view=rev&rev=565917
Log:
AXIS2-3121
Contributor:Dan Sedov
Fix programming typo in Attachments.

Modified:
    webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Attachments.java

Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Attachments.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Attachments.java?view=diff&rev=565917&r1=565916&r2=565917
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Attachments.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/attachments/Attachments.java Tue Aug 14 14:21:30 2007
@@ -144,6 +144,9 @@
         this.contentLength = contentLength;
         this.attachmentRepoDir = attachmentRepoDir;
         this.fileCacheEnable = fileCacheEnable;
+        if (log.isDebugEnabled()) {
+            log.debug("Attachments contentLength=" + contentLength + ", contentTypeString=" + contentTypeString);
+        }
         if (fileThreshold != null && (!"".equals(fileThreshold))) {
             this.fileStorageThreshold = Integer.parseInt(fileThreshold);
         } else {
@@ -170,6 +173,9 @@
             }
             this.boundary = ("--" + contentType.getParameter("boundary"))
                     .getBytes(encoding);
+            if (log.isDebugEnabled()) {
+                log.debug("boundary=" + new String(this.boundary));
+            }
         } catch (UnsupportedEncodingException e) {
             throw new OMException(e);
         }
@@ -352,6 +358,9 @@
      */
     public String getSOAPPartContentID() {
         String rootContentID = contentType.getParameter("start");
+        if (log.isDebugEnabled()) {
+            log.debug("getSOAPPartContentID rootContentID=" + rootContentID);
+        }
 
         // to handle the Start parameter not mentioned situation
         if (rootContentID == null) {
@@ -484,7 +493,8 @@
                             partContentID = partContentID.substring(1, (partContentID
                                     .length() - 1));
 
-                        } else if (partIndex == 1) {
+                        } 
+                        if (partIndex == 1) {
                             firstPartId = partContentID;
                         }
                         if (attachmentsMap.containsKey(partContentID)) {



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