From 4b7d9b1f9c38c60ac43a752ed1f244abbb1000e2 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Tue, 14 Dec 2021 16:48:07 +0100 Subject: [PATCH] Avoid compilation warning for test class with serializable base class --- .../concurrent/ThreadPoolExecutorFactoryBeanTests.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spring-context/src/test/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBeanTests.java b/spring-context/src/test/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBeanTests.java index d350341a8c..8f81b987c8 100644 --- a/spring-context/src/test/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBeanTests.java +++ b/spring-context/src/test/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBeanTests.java @@ -76,6 +76,7 @@ class ThreadPoolExecutorFactoryBeanTests { verify(threadPoolExecutor).prestartAllCoreThreads(); } + @Configuration static class ExecutorConfig { @@ -83,9 +84,10 @@ class ThreadPoolExecutorFactoryBeanTests { ThreadPoolExecutorFactoryBean executor() { return new ThreadPoolExecutorFactoryBean(); } - } + + @SuppressWarnings("serial") private static class TestThreadPoolExecutorFactoryBean extends ThreadPoolExecutorFactoryBean { @Override