|
20 | 20 |
|
21 | 21 | import org.junit.jupiter.api.Test;
|
22 | 22 |
|
23 |
| -import org.springframework.aot.hint.MemberCategory; |
24 | 23 | import org.springframework.aot.hint.RuntimeHints;
|
25 |
| -import org.springframework.aot.hint.RuntimeHintsRegistrar; |
26 |
| -import org.springframework.aot.hint.TypeReference; |
27 | 24 | import org.springframework.aot.test.agent.EnabledIfRuntimeHintsAgent;
|
28 | 25 | import org.springframework.aot.test.agent.RuntimeHintsInvocations;
|
29 | 26 | import org.springframework.aot.test.agent.RuntimeHintsRecorder;
|
@@ -80,18 +77,7 @@ void generateApplicationContextWithMultipleInitDestroyMethods() {
|
80 | 77 | beanDefinition.setInitMethodName("customInit");
|
81 | 78 | beanDefinition.setDestroyMethodName("customDestroy");
|
82 | 79 | context.registerBeanDefinition("initDestroyComponent", beanDefinition);
|
83 |
| - compile(context, (hints, invocations) -> assertThat(invocations) |
84 |
| - .withRegistrar(new InitDestroyIssueRegistrar()).match(hints)); |
85 |
| - } |
86 |
| - |
87 |
| - // TODO: Remove once https://github.com/spring-projects/spring-framework/issues/29077 is fixed |
88 |
| - static class InitDestroyIssueRegistrar implements RuntimeHintsRegistrar { |
89 |
| - @Override |
90 |
| - public void registerHints(RuntimeHints hints, ClassLoader classLoader) { |
91 |
| - hints.reflection() |
92 |
| - .registerType(TypeReference.of(InitDestroyComponent.class.getName()), typeHint -> |
93 |
| - typeHint.withMembers(MemberCategory.INTROSPECT_PUBLIC_METHODS)); |
94 |
| - } |
| 80 | + compile(context, (hints, invocations) -> assertThat(invocations).match(hints)); |
95 | 81 | }
|
96 | 82 |
|
97 | 83 | @SuppressWarnings({ "rawtypes", "unchecked" })
|
|
0 commit comments