Do not register SynthesizedAnnotation proxy for @AliasFor
Closes gh-28953
This commit is contained in:
@@ -37,6 +37,7 @@ import static org.assertj.core.api.Assertions.assertThat;
|
||||
* Tests for {@link RuntimeHintsUtils}.
|
||||
*
|
||||
* @author Stephane Nicoll
|
||||
* @author Sam Brannen
|
||||
*/
|
||||
class RuntimeHintsUtilsTests {
|
||||
|
||||
@@ -80,6 +81,14 @@ class RuntimeHintsUtilsTests {
|
||||
.hasSize(2);
|
||||
}
|
||||
|
||||
@Test // gh-28953
|
||||
void registerAnnotationForAliasForShouldNotRegisterSynthesizedAnnotationProxy() {
|
||||
RuntimeHintsUtils.registerAnnotation(this.hints, AliasFor.class);
|
||||
assertThat(this.hints.reflection().typeHints()).singleElement()
|
||||
.satisfies(annotationHint(AliasFor.class));
|
||||
assertThat(this.hints.proxies().jdkProxies()).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
void registerAnnotationTypeWhereUsedAsAMetaAnnotationRegistersHierarchy() {
|
||||
RuntimeHintsUtils.registerAnnotation(this.hints, RetryWithEnabledFlagInvoker.class);
|
||||
|
||||
Reference in New Issue
Block a user