Skip to content

Commit 8d6d3f2

Browse files
committed
Polishing
1 parent afff849 commit 8d6d3f2

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

spring-test/src/main/java/org/springframework/test/context/aot/hint/TestContextRuntimeHints.java

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,26 +64,20 @@ public void registerHints(RuntimeHints runtimeHints, ClassLoader classLoader) {
6464
}
6565
}
6666

67+
// Loaded reflectively in BootstrapUtils
6768
registerAnnotation(runtimeHints.reflection(),
68-
// Loaded reflectively in BootstrapUtils
6969
org.springframework.test.context.web.WebAppConfiguration.class
7070
);
7171
}
7272

7373
private static void registerPublicConstructors(ReflectionHints reflectionHints, Class<?>... types) {
74-
registerPublicConstructors(reflectionHints, TypeReference.listOf(types));
75-
}
76-
77-
private static void registerPublicConstructors(ReflectionHints reflectionHints, Iterable<TypeReference> types) {
78-
reflectionHints.registerTypes(types, TypeHint.builtWith(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
74+
reflectionHints.registerTypes(TypeReference.listOf(types),
75+
TypeHint.builtWith(MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS));
7976
}
8077

8178
private static void registerDeclaredConstructors(ReflectionHints reflectionHints, String... classNames) {
82-
registerDeclaredConstructors(reflectionHints, listOf(classNames));
83-
}
84-
85-
private static void registerDeclaredConstructors(ReflectionHints reflectionHints, Iterable<TypeReference> types) {
86-
reflectionHints.registerTypes(types, TypeHint.builtWith(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS));
79+
reflectionHints.registerTypes(listOf(classNames),
80+
TypeHint.builtWith(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS));
8781
}
8882

8983
private static List<TypeReference> listOf(String... classNames) {

0 commit comments

Comments
 (0)