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


The following commit(s) were added to refs/heads/master by this push:
     new 284e833  JAMES-2695 EventCollector has to be thread-safe
     new 8d87335  Merge remote-tracking branch 
'mbaechler/event-collector-should-be-threadsafe'
284e833 is described below

commit 284e833244fe5178e4dece2e46bc62d3578bc0e1
Author: Matthieu Baechler <[email protected]>
AuthorDate: Wed Mar 20 09:00:24 2019 +0100

    JAMES-2695 EventCollector has to be thread-safe
---
 .../test/java/org/apache/james/mailbox/util/EventCollector.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/mailbox/api/src/test/java/org/apache/james/mailbox/util/EventCollector.java 
b/mailbox/api/src/test/java/org/apache/james/mailbox/util/EventCollector.java
index 58908c4..80d0d97 100644
--- 
a/mailbox/api/src/test/java/org/apache/james/mailbox/util/EventCollector.java
+++ 
b/mailbox/api/src/test/java/org/apache/james/mailbox/util/EventCollector.java
@@ -19,8 +19,8 @@
 
 package org.apache.james.mailbox.util;
 
-import java.util.ArrayList;
-import java.util.List;
+import java.util.Collection;
+import java.util.concurrent.ConcurrentLinkedDeque;
 
 import org.apache.james.mailbox.events.Event;
 import org.apache.james.mailbox.events.Group;
@@ -31,14 +31,14 @@ public class EventCollector implements 
MailboxListener.GroupMailboxListener {
 
     private static final Group GROUP = new EventCollectorGroup();
 
-    private final List<Event> events = new ArrayList<>();
+    private final ConcurrentLinkedDeque<Event> events = new 
ConcurrentLinkedDeque<>();
 
     @Override
     public Group getDefaultGroup() {
         return GROUP;
     }
 
-    public List<Event> getEvents() {
+    public Collection<Event> getEvents() {
         return events;
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to