james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [19/19] james-project git commit: PROTOCOLS-117 Use StreamUtils::flatten
Date Wed, 15 Nov 2017 11:16:00 GMT
PROTOCOLS-117 Use StreamUtils::flatten


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

Branch: refs/heads/master
Commit: 944643b6b21ec75ff803b2788205772a94acd7cd
Parents: 5c904e1
Author: benwa <btellier@linagora.com>
Authored: Wed Nov 8 11:35:04 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Wed Nov 15 18:05:46 2017 +0700

----------------------------------------------------------------------
 mdn/src/main/java/org/apache/james/mdn/MDNReport.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/944643b6/mdn/src/main/java/org/apache/james/mdn/MDNReport.java
----------------------------------------------------------------------
diff --git a/mdn/src/main/java/org/apache/james/mdn/MDNReport.java b/mdn/src/main/java/org/apache/james/mdn/MDNReport.java
index 2d84c86..2878bfa 100644
--- a/mdn/src/main/java/org/apache/james/mdn/MDNReport.java
+++ b/mdn/src/main/java/org/apache/james/mdn/MDNReport.java
@@ -36,6 +36,7 @@ import org.apache.james.mdn.fields.OriginalRecipient;
 import org.apache.james.mdn.fields.ReportingUserAgent;
 import org.apache.james.mdn.fields.Text;
 import org.apache.james.util.OptionalUtils;
+import org.apache.james.util.StreamUtils;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Preconditions;
@@ -233,9 +234,10 @@ public class MDNReport {
         Stream<Optional<? extends Field>> extentions =
             extensionFields.stream().map(Optional::of);
 
-        return Stream.concat(
-            definedFields,
-            Stream.concat(errors,
+        return StreamUtils.flatten(
+            Stream.of(
+                definedFields,
+                errors,
                 extentions))
             .flatMap(OptionalUtils::toStream)
             .map(Field::formattedValue)


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