diff --git a/spring-test/src/main/java/org/springframework/test/context/aot/AotTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/aot/AotTestExecutionListener.java index 506eee43ee..c032d955da 100644 --- a/spring-test/src/main/java/org/springframework/test/context/aot/AotTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/aot/AotTestExecutionListener.java @@ -33,10 +33,10 @@ public interface AotTestExecutionListener extends TestExecutionListener { * {@link RuntimeHints} instance. *

If possible, implementations should use the specified {@link ClassLoader} * to determine if hints have to be contributed. - * @param testClass the test class to process * @param runtimeHints the {@code RuntimeHints} to use + * @param testClass the test class to process * @param classLoader the classloader to use */ - void processAheadOfTime(Class testClass, RuntimeHints runtimeHints, ClassLoader classLoader); + void processAheadOfTime(RuntimeHints runtimeHints, Class testClass, ClassLoader classLoader); } diff --git a/spring-test/src/main/java/org/springframework/test/context/aot/TestContextAotGenerator.java b/spring-test/src/main/java/org/springframework/test/context/aot/TestContextAotGenerator.java index c71ef727e0..4d2c5c443d 100644 --- a/spring-test/src/main/java/org/springframework/test/context/aot/TestContextAotGenerator.java +++ b/spring-test/src/main/java/org/springframework/test/context/aot/TestContextAotGenerator.java @@ -233,7 +233,7 @@ public class TestContextAotGenerator { testContextBootstrapper.getTestExecutionListeners().forEach(listener -> { registerDeclaredConstructors(listener.getClass()); // @TestExecutionListeners if (listener instanceof AotTestExecutionListener aotListener) { - aotListener.processAheadOfTime(testClass, this.runtimeHints, getClass().getClassLoader()); + aotListener.processAheadOfTime(this.runtimeHints, testClass, getClass().getClassLoader()); } }); return testContextBootstrapper.buildMergedContextConfiguration(); diff --git a/spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java b/spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java index d0ad828c7b..081ee897e5 100644 --- a/spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java +++ b/spring-test/src/main/java/org/springframework/test/context/jdbc/SqlScriptsTestExecutionListener.java @@ -147,7 +147,7 @@ public class SqlScriptsTestExecutionListener extends AbstractTestExecutionListen * @since 6.0 */ @Override - public void processAheadOfTime(Class testClass, RuntimeHints runtimeHints, ClassLoader classLoader) { + public void processAheadOfTime(RuntimeHints runtimeHints, Class testClass, ClassLoader classLoader) { getSqlAnnotationsFor(testClass).forEach(sql -> registerClasspathResources(getScripts(sql, testClass, null, true), runtimeHints, classLoader)); getSqlMethods(testClass).forEach(testMethod ->