svn commit: r1022409 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1022409 - /ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java

hansbak-2
Author: hansbak
Date: Thu Oct 14 08:04:48 2010
New Revision: 1022409

URL: http://svn.apache.org/viewvc?rev=1022409&view=rev
Log:
correction on commit 1000753 attachment name list is optional making send invoice fail

Modified:
    ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java

Modified: ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java?rev=1022409&r1=1022408&r2=1022409&view=diff
==============================================================================
--- ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java (original)
+++ ofbiz/trunk/framework/common/src/org/ofbiz/common/email/EmailServices.java Thu Oct 14 08:04:48 2010
@@ -491,11 +491,12 @@ public class EmailServices {
             
             for (int i = 0; i < xslfoAttachScreenLocationList.size(); i++) {
                 String xslfoAttachScreenLocation = xslfoAttachScreenLocationList.get(i);
-                String attachmentName = attachmentNameList.get(i);
-                if (UtilValidate.isEmpty(attachmentName)) {
-                    attachmentName = "Details" + i + ".pdf";
+                String attachmentName = "Details.pdf";
+                if (UtilValidate.isNotEmpty(attachmentNameList) && attachmentNameList.size() >= i) {
+                 attachmentName = attachmentNameList.get(i);
+                } else {
+                    attachmentName = "Details.pdf";
                 }
-
                 isMultiPart = true;
                 // start processing fo pdf attachment
                 try {