Skip to content

Commit 1e80171

Browse files
committed
Remove unnecessary workaround
See spring-projectsgh-29091
1 parent 323d190 commit 1e80171

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

spring-context/src/test/java/org/springframework/context/generator/ApplicationContextAotGeneratorRuntimeHintsTests.java

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,7 @@
2020

2121
import org.junit.jupiter.api.Test;
2222

23-
import org.springframework.aot.hint.MemberCategory;
2423
import org.springframework.aot.hint.RuntimeHints;
25-
import org.springframework.aot.hint.RuntimeHintsRegistrar;
26-
import org.springframework.aot.hint.TypeReference;
2724
import org.springframework.aot.test.agent.EnabledIfRuntimeHintsAgent;
2825
import org.springframework.aot.test.agent.RuntimeHintsInvocations;
2926
import org.springframework.aot.test.agent.RuntimeHintsRecorder;
@@ -80,18 +77,7 @@ void generateApplicationContextWithMultipleInitDestroyMethods() {
8077
beanDefinition.setInitMethodName("customInit");
8178
beanDefinition.setDestroyMethodName("customDestroy");
8279
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));
9581
}
9682

9783
@SuppressWarnings({ "rawtypes", "unchecked" })

0 commit comments

Comments
 (0)