Deprecate SynthesizedAnnotation and related methods

Since Spring no longer adds the SynthesizedAnnotation interface to the
JDK dynamic proxy used to synthesize an annotation, this commit
officially deprecates SynthesizedAnnotation and related methods in
RuntimeHintsUtils.

See gh-29041, gh-29054
Closes gh-29053
This commit is contained in:
Sam Brannen
2022-09-02 11:55:22 +02:00
parent 0ec03a8dd6
commit 69f23095b8
12 changed files with 37 additions and 12 deletions

View File

@@ -169,7 +169,7 @@ class TestContextRuntimeHints implements RuntimeHintsRegistrar {
}
@SafeVarargs
@SuppressWarnings("unchecked")
@SuppressWarnings({ "unchecked", "deprecation" })
private static void registerSynthesizedAnnotations(RuntimeHints runtimeHints, Class<? extends Annotation>... annotationTypes) {
for (Class<? extends Annotation> annotationType : annotationTypes) {
registerAnnotation(runtimeHints.reflection(), annotationType);