You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by ro...@apache.org on 2019/10/18 06:40:50 UTC

[james-project] 17/17: JAMES-2813 use immutable datastructure when building history in TaskAggregateTest

This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit a21e5ecc3048acb88c13b79159d829af964c44f0
Author: RĂ©mi KOWALSKI <rk...@linagora.com>
AuthorDate: Thu Oct 17 11:48:20 2019 +0200

    JAMES-2813 use immutable datastructure when building history in TaskAggregateTest
---
 .../java/org/apache/james/task/eventsourcing/TaskAggregateTest.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/server/task/task-memory/src/test/java/org/apache/james/task/eventsourcing/TaskAggregateTest.java b/server/task/task-memory/src/test/java/org/apache/james/task/eventsourcing/TaskAggregateTest.java
index e12f8bc..b9bdbb1 100644
--- a/server/task/task-memory/src/test/java/org/apache/james/task/eventsourcing/TaskAggregateTest.java
+++ b/server/task/task-memory/src/test/java/org/apache/james/task/eventsourcing/TaskAggregateTest.java
@@ -24,7 +24,6 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy;
 import java.time.Instant;
 import java.util.Arrays;
 import java.util.function.Function;
-import java.util.stream.Collectors;
 import java.util.stream.Stream;
 
 import org.apache.james.eventsourcing.Event;
@@ -36,6 +35,7 @@ import org.apache.james.task.Task;
 import org.apache.james.task.TaskId;
 import org.junit.jupiter.api.Test;
 
+import com.github.steveash.guavate.Guavate;
 import com.google.common.collect.Streams;
 import scala.Option;
 
@@ -51,7 +51,7 @@ class TaskAggregateTest {
                     Stream.iterate(EventId.first(), EventId::next),
                     Arrays.stream(events),
                     (id, event) -> event.apply(id))
-                .collect(Collectors.toList()));
+                .collect(Guavate.toImmutableList()));
     }
 
     @Test


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