james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [4/5] james-jsieve git commit: JSIEVE-107 Minor cosmetic fixes
Date Tue, 14 Mar 2017 06:23:17 GMT
JSIEVE-107 Minor cosmetic fixes


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

Branch: refs/heads/JSIEVE-107
Commit: 0cec1479760c06adc79bbc94aef9e154e0d39f5a
Parents: 641a6f9
Author: Daniele Depetrini <daniele.depetrini@infocert.it>
Authored: Wed Jan 4 15:08:01 2017 +0100
Committer: Laura Royet <lroyet@linagora.com>
Committed: Thu Jan 12 09:21:42 2017 +0100

----------------------------------------------------------------------
 .../org/apache/jsieve/util/check/ScriptCheckMailAdapter.java  | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-jsieve/blob/0cec1479/util/src/main/java/org/apache/jsieve/util/check/ScriptCheckMailAdapter.java
----------------------------------------------------------------------
diff --git a/util/src/main/java/org/apache/jsieve/util/check/ScriptCheckMailAdapter.java b/util/src/main/java/org/apache/jsieve/util/check/ScriptCheckMailAdapter.java
index 6a06c5c..c9d6def 100644
--- a/util/src/main/java/org/apache/jsieve/util/check/ScriptCheckMailAdapter.java
+++ b/util/src/main/java/org/apache/jsieve/util/check/ScriptCheckMailAdapter.java
@@ -28,12 +28,12 @@ import org.apache.jsieve.mail.SieveMailException;
 import org.apache.jsieve.parser.address.SieveAddressBuilder;
 import org.apache.jsieve.parser.generated.address.ParseException;
 
+import javax.mail.internet.MimeUtility;
 import javax.mail.Header;
 import javax.mail.Message;
 import javax.mail.MessagingException;
 import java.io.IOException;
 import java.util.*;
-import javax.mail.internet.MimeUtility;
 import java.io.UnsupportedEncodingException;
 
 /**
@@ -139,10 +139,11 @@ public class ScriptCheckMailAdapter implements MailAdapter {
             try {
                 String[] values = mail.getHeader(name);
                 if (values != null) {
-                    //We need to do unfold headers here
+                    // We need to do unfold headers + decoding here
                     result = new LinkedList<String>();
-                    for (String value: values)
+                    for (String value: values) {
                         result.add(MimeUtility.decodeText(MimeUtility.unfold(value)));
+                    }
                 }
             } catch (MessagingException e) {
                 throw new SieveMailException(e);


---------------------------------------------------------------------
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