Skip to content

Commit 8540764

Browse files
committed
GH-9878: Fix ConcurrentModificationException in SpringIntegrationTestExecutionListener
Fixes: gh-9878 * return new list in MockIntegrationContext.getAutoStartupCandidates() Signed-off-by: Alexander Hain <[email protected]>
1 parent 7993e3c commit 8540764

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spring-integration-test/src/main/java/org/springframework/integration/test/context/MockIntegrationContext.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.util.ArrayList;
2020
import java.util.Arrays;
2121
import java.util.Collection;
22+
import java.util.Collections;
2223
import java.util.List;
2324

2425
import reactor.core.publisher.Mono;
@@ -59,6 +60,7 @@
5960
*
6061
* @author Artem Bilan
6162
* @author Yicheng Feng
63+
* @author Alexander Hain
6264
*
6365
* @since 5.0
6466
*
@@ -111,7 +113,7 @@ public void afterSingletonsInstantiated() {
111113
}
112114

113115
List<AbstractEndpoint> getAutoStartupCandidates() {
114-
return this.autoStartupCandidates;
116+
return Collections.unmodifiableList(this.autoStartupCandidates);
115117
}
116118

117119
/**

0 commit comments

Comments
 (0)