Register proxy hint for meta-annotations with attribute override

Closes gh-28767
This commit is contained in:
Stephane Nicoll
2022-07-29 13:23:32 +02:00
parent e0190c12d4
commit 56a8c1a9db
2 changed files with 14 additions and 6 deletions

View File

@@ -60,7 +60,10 @@ public abstract class RuntimeHintsUtils {
hints.reflection().registerType(annotationType, ANNOTATION_HINT);
Set<Class<?>> allAnnotations = new LinkedHashSet<>();
collectAliasedAnnotations(new HashSet<>(), allAnnotations, annotationType);
allAnnotations.forEach(annotation -> hints.reflection().registerType(annotation, ANNOTATION_HINT));
allAnnotations.forEach(annotation -> {
hints.reflection().registerType(annotation, ANNOTATION_HINT);
hints.proxies().registerJdkProxy(annotation, SynthesizedAnnotation.class);
});
if (!allAnnotations.isEmpty()) {
hints.proxies().registerJdkProxy(annotationType, SynthesizedAnnotation.class);
}