Skip to content

Commit 516c48d

Browse files
committed
GH-208 - Switch to CopyOnWriteArrayList for DefaultPublishedEvents.
1 parent 4cdf14d commit 516c48d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-modulith-test/src/main/java/org/springframework/modulith/test/DefaultPublishedEvents.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
*/
1616
package org.springframework.modulith.test;
1717

18-
import java.util.ArrayList;
1918
import java.util.Collection;
2019
import java.util.Collections;
2120
import java.util.Iterator;
2221
import java.util.List;
2322
import java.util.Objects;
23+
import java.util.concurrent.CopyOnWriteArrayList;
2424
import java.util.function.Function;
2525
import java.util.function.Predicate;
2626
import java.util.stream.Collectors;
@@ -56,7 +56,7 @@ class DefaultPublishedEvents implements PublishedEvents, ApplicationListener<App
5656

5757
Assert.notNull(events, "Events must not be null!");
5858

59-
this.events = new ArrayList<>(events);
59+
this.events = new CopyOnWriteArrayList<>(events);
6060
}
6161

6262
/*

0 commit comments

Comments
 (0)