From 5442f2c67a67cb500e9b5c6915c920d9759d4a7b Mon Sep 17 00:00:00 2001 From: Ozan Gunalp Date: Wed, 27 Sep 2023 10:55:03 +0200 Subject: [PATCH] fix: change the AssertSubscriber items list back to copyOnWrite --- .../io/smallrye/mutiny/helpers/test/AssertSubscriber.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/implementation/src/main/java/io/smallrye/mutiny/helpers/test/AssertSubscriber.java b/implementation/src/main/java/io/smallrye/mutiny/helpers/test/AssertSubscriber.java index 125bebb5c..f5b047976 100644 --- a/implementation/src/main/java/io/smallrye/mutiny/helpers/test/AssertSubscriber.java +++ b/implementation/src/main/java/io/smallrye/mutiny/helpers/test/AssertSubscriber.java @@ -5,8 +5,6 @@ import static java.time.Duration.ofSeconds; import java.time.Duration; -import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.NoSuchElementException; import java.util.concurrent.*; @@ -67,7 +65,7 @@ public class AssertSubscriber implements MultiSubscriber, ContextSupport { /** * The received items. */ - private final List items = Collections.synchronizedList(new ArrayList<>()); + private final List items = new CopyOnWriteArrayList<>(); /** * The received failure.