Consistently declare RuntimeHints parameter 1st in test AOT APIs

This commit is contained in:
Sam Brannen 2022-10-05 19:01:41 +02:00
parent 935265048a
commit 98801f8a5b
3 changed files with 4 additions and 4 deletions

View File

@ -33,10 +33,10 @@ public interface AotTestExecutionListener extends TestExecutionListener {
* {@link RuntimeHints} instance.
* <p>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);
}

View File

@ -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();

View File

@ -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 ->