File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
spring-test/src/main/java/org/springframework/test/context Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 21
21
import java .util .ArrayList ;
22
22
import java .util .Collections ;
23
23
import java .util .List ;
24
+ import java .util .function .Supplier ;
24
25
25
26
import org .apache .commons .logging .Log ;
26
27
import org .apache .commons .logging .LogFactory ;
@@ -94,8 +95,15 @@ public class TestContextManager {
94
95
95
96
private final TestContext testContext ;
96
97
97
- private final ThreadLocal <TestContext > testContextHolder =
98
- ThreadLocal .withInitial (() -> copyTestContext (TestContextManager .this .testContext ));
98
+ private final ThreadLocal <TestContext > testContextHolder = ThreadLocal .withInitial (
99
+ // Implemented as an anonymous inner class instead of a lambda expression due to a bug
100
+ // in Eclipse IDE: "The blank final field testContext may not have been initialized"
101
+ new Supplier <TestContext >() {
102
+ @ Override
103
+ public TestContext get () {
104
+ return copyTestContext (TestContextManager .this .testContext );
105
+ }
106
+ });
99
107
100
108
private final List <TestExecutionListener > testExecutionListeners = new ArrayList <>();
101
109
You can’t perform that action at this time.
0 commit comments