james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rouaz...@apache.org
Subject [48/50] [abbrv] james-project git commit: MAILET-115 Use constants and solve an IntelliJ warning in MailMessageAlteringUtils
Date Wed, 11 Jan 2017 09:26:36 GMT
MAILET-115 Use constants and solve an IntelliJ warning in MailMessageAlteringUtils


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/b1090d66
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/b1090d66
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/b1090d66

Branch: refs/heads/master
Commit: b1090d66d9d06d9118a7e8d056331809ff2c35dd
Parents: 1fd4911
Author: Benoit Tellier <btellier@linagora.com>
Authored: Wed Jan 11 11:00:38 2017 +0700
Committer: Benoit Tellier <btellier@linagora.com>
Committed: Wed Jan 11 11:02:15 2017 +0700

----------------------------------------------------------------------
 .../transport/mailets/redirect/MailMessageAlteringUtils.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/b1090d66/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/redirect/MailMessageAlteringUtils.java
----------------------------------------------------------------------
diff --git a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/redirect/MailMessageAlteringUtils.java
b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/redirect/MailMessageAlteringUtils.java
index 978c0b4..1f0e0b8 100644
--- a/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/redirect/MailMessageAlteringUtils.java
+++ b/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/redirect/MailMessageAlteringUtils.java
@@ -117,7 +117,7 @@ public class MailMessageAlteringUtils {
                 mailet.log("attachmentType:" + mailet.getInitParameters().getAttachmentType());
             }
             if (!mailet.getInitParameters().getAttachmentType().equals(TypeCode.NONE)) {
-                multipart.addBodyPart(getAttachmentPart(originalMail, originalMessage, head));
+                multipart.addBodyPart(getAttachmentPart(originalMessage, head));
             }
 
             if (mailet.getInitParameters().isAttachError() && originalMail.getErrorMessage()
!= null) {
@@ -134,11 +134,11 @@ public class MailMessageAlteringUtils {
     private BodyPart getBodyPart(Mail originalMail, MimeMessage originalMessage, String head)
throws MessagingException, Exception {
         MimeBodyPart part = new MimeBodyPart();
         part.setText(getText(originalMail, originalMessage, head));
-        part.setDisposition("inline");
+        part.setDisposition(javax.mail.Part.INLINE);
         return part;
     }
 
-    private MimeBodyPart getAttachmentPart(Mail originalMail, MimeMessage originalMessage,
String head) throws MessagingException, Exception {
+    private MimeBodyPart getAttachmentPart(MimeMessage originalMessage, String head) throws
MessagingException, Exception {
         MimeBodyPart attachmentPart = new MimeBodyPart();
         switch (mailet.getInitParameters().getAttachmentType()) {
             case HEADS:
@@ -163,7 +163,7 @@ public class MailMessageAlteringUtils {
                 break;
         }
         attachmentPart.setFileName(getFileName(originalMessage.getSubject()));
-        attachmentPart.setDisposition("Attachment");
+        attachmentPart.setDisposition(javax.mail.Part.ATTACHMENT);
         return attachmentPart;
     }
 


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


Mime
View raw message