Skip to content

Commit c47f6cb

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 c47f6cb

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2024 the original author or authors.
2+
* Copyright 2017-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,10 +16,7 @@
1616

1717
package org.springframework.integration.test.context;
1818

19-
import java.util.ArrayList;
20-
import java.util.Arrays;
21-
import java.util.Collection;
22-
import java.util.List;
19+
import java.util.*;
2320

2421
import reactor.core.publisher.Mono;
2522

@@ -111,7 +108,7 @@ public void afterSingletonsInstantiated() {
111108
}
112109

113110
List<AbstractEndpoint> getAutoStartupCandidates() {
114-
return this.autoStartupCandidates;
111+
return Collections.unmodifiableList(this.autoStartupCandidates);
115112
}
116113

117114
/**

0 commit comments

Comments
 (0)