You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by rc...@apache.org on 2020/12/28 07:43:35 UTC

[james-project] 03/16: JAMES-3469 MemoryMailboxChangeRepository should be Thread safe

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

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

commit 39cef3a96aa386708159596cc1f4205c737d6fcb
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Mon Dec 21 10:58:50 2020 +0700

    JAMES-3469 MemoryMailboxChangeRepository should be Thread safe
---
 .../apache/james/jmap/memory/change/MemoryMailboxChangeRepository.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/data/data-jmap/src/main/java/org/apache/james/jmap/memory/change/MemoryMailboxChangeRepository.java b/server/data/data-jmap/src/main/java/org/apache/james/jmap/memory/change/MemoryMailboxChangeRepository.java
index ac45191..b50b497 100644
--- a/server/data/data-jmap/src/main/java/org/apache/james/jmap/memory/change/MemoryMailboxChangeRepository.java
+++ b/server/data/data-jmap/src/main/java/org/apache/james/jmap/memory/change/MemoryMailboxChangeRepository.java
@@ -35,6 +35,7 @@ import org.apache.james.jmap.api.model.AccountId;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ArrayListMultimap;
 import com.google.common.collect.Multimap;
+import com.google.common.collect.Multimaps;
 
 import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
@@ -45,7 +46,7 @@ public class MemoryMailboxChangeRepository implements MailboxChangeRepository {
     private final Multimap<AccountId, MailboxChange> mailboxChangeMap;
 
     public MemoryMailboxChangeRepository() {
-        this.mailboxChangeMap = ArrayListMultimap.create();
+        this.mailboxChangeMap = Multimaps.synchronizedListMultimap(ArrayListMultimap.create());
     }
 
     @Override


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