diff --git a/org.springframework.context/src/test/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessorTests.java b/org.springframework.context/src/test/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessorTests.java index 7991015c5d..0124bb18d1 100644 --- a/org.springframework.context/src/test/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessorTests.java +++ b/org.springframework.context/src/test/java/org/springframework/scheduling/annotation/AsyncAnnotationBeanPostProcessorTests.java @@ -100,7 +100,7 @@ public class AsyncAnnotationBeanPostProcessorTests { private Thread thread; - private CountDownLatch latch; + private final CountDownLatch latch = new CountDownLatch(1); public Thread getThread() { return this.thread;