Revise method signature in TestRuntimeHintsRegistrar

This commit is contained in:
Sam Brannen 2022-09-05 12:01:03 +02:00
parent 16ff05ed86
commit c2dd6667f1
3 changed files with 7 additions and 7 deletions

View File

@ -120,8 +120,8 @@ public class TestContextAotGenerator {
logger.debug(LogMessage.format("Generating AOT artifacts for test classes %s",
testClasses.stream().map(Class::getName).toList()));
try {
this.testRuntimeHintsRegistrars.forEach(registrar -> registrar.registerHints(this.runtimeHints,
mergedConfig, Collections.unmodifiableList(testClasses), getClass().getClassLoader()));
this.testRuntimeHintsRegistrars.forEach(registrar -> registrar.registerHints(mergedConfig,
Collections.unmodifiableList(testClasses), this.runtimeHints, getClass().getClassLoader()));
// Use first test class discovered for a given unique MergedContextConfiguration.
Class<?> testClass = testClasses.get(0);

View File

@ -45,13 +45,13 @@ public interface TestRuntimeHintsRegistrar {
/**
* Contribute hints to the given {@link RuntimeHints} instance.
* @param runtimeHints the {@code RuntimeHints} to use
* @param mergedConfig the merged context configuration to process
* @param testClasses the test classes that share the supplied merged context
* configuration
* @param runtimeHints the {@code RuntimeHints} to use
* @param classLoader the classloader to use
*/
void registerHints(RuntimeHints runtimeHints, MergedContextConfiguration mergedConfig,
List<Class<?>> testClasses, ClassLoader classLoader);
void registerHints(MergedContextConfiguration mergedConfig, List<Class<?>> testClasses,
RuntimeHints runtimeHints, ClassLoader classLoader);
}

View File

@ -47,8 +47,8 @@ class StandardTestRuntimeHints implements TestRuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints runtimeHints, MergedContextConfiguration mergedConfig,
List<Class<?>> testClasses, ClassLoader classLoader) {
public void registerHints(MergedContextConfiguration mergedConfig, List<Class<?>> testClasses,
RuntimeHints runtimeHints, ClassLoader classLoader) {
registerHintsForMergedContextConfiguration(runtimeHints, mergedConfig);
testClasses.forEach(testClass -> registerHintsForActiveProfilesResolvers(runtimeHints, testClass));