Skip to content

Commit bb9cf7c

Browse files
committed
Merge branch '5.3.x'
2 parents ae51ca9 + c9cd53f commit bb9cf7c

File tree

4 files changed

+2
-12
lines changed

4 files changed

+2
-12
lines changed

spring-core/src/main/java/org/springframework/core/annotation/AnnotationsScanner.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -92,7 +92,6 @@ private static <C, R> R process(C context, AnnotatedElement source,
9292
}
9393

9494
@Nullable
95-
@SuppressWarnings("deprecation")
9695
private static <C, R> R processClass(C context, Class<?> source,
9796
SearchStrategy searchStrategy, AnnotationsProcessor<C, R> processor) {
9897

@@ -230,7 +229,6 @@ private static <C, R> R processClassHierarchy(C context, int[] aggregateIndex, C
230229
}
231230

232231
@Nullable
233-
@SuppressWarnings("deprecation")
234232
private static <C, R> R processMethod(C context, Method source,
235233
SearchStrategy searchStrategy, AnnotationsProcessor<C, R> processor) {
236234

@@ -501,7 +499,6 @@ static boolean hasPlainJavaAnnotationsOnly(Class<?> type) {
501499
return (type.getName().startsWith("java.") || type == Ordered.class);
502500
}
503501

504-
@SuppressWarnings("deprecation")
505502
private static boolean isWithoutHierarchy(AnnotatedElement source, SearchStrategy searchStrategy) {
506503
if (source == Object.class) {
507504
return true;

spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotations.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,9 +482,7 @@ enum SearchStrategy {
482482
* need to be meta-annotated with {@link Inherited @Inherited}. When
483483
* searching a {@link Method} source, this strategy is identical to
484484
* {@link #TYPE_HIERARCHY}.
485-
* @deprecated as of Spring Framework 5.3.17; to be removed in Spring Framework 6.0
486485
*/
487-
@Deprecated
488486
TYPE_HIERARCHY_AND_ENCLOSING_CLASSES
489487
}
490488

spring-core/src/test/java/org/springframework/core/annotation/AnnotationsScannerTests.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -421,23 +421,20 @@ void typeHierarchyStrategyOnMethodWithGenericParameterNonOverrideScansAnnotation
421421
}
422422

423423
@Test
424-
@SuppressWarnings("deprecation")
425424
void typeHierarchyWithEnclosedStrategyOnEnclosedStaticClassScansAnnotations() {
426425
Class<?> source = AnnotationEnclosingClassSample.EnclosedStatic.EnclosedStaticStatic.class;
427426
assertThat(scan(source, SearchStrategy.TYPE_HIERARCHY_AND_ENCLOSING_CLASSES))
428427
.containsExactly("0:EnclosedThree", "1:EnclosedTwo", "2:EnclosedOne");
429428
}
430429

431430
@Test
432-
@SuppressWarnings("deprecation")
433431
void typeHierarchyWithEnclosedStrategyOnEnclosedInnerClassScansAnnotations() {
434432
Class<?> source = AnnotationEnclosingClassSample.EnclosedInner.EnclosedInnerInner.class;
435433
assertThat(scan(source, SearchStrategy.TYPE_HIERARCHY_AND_ENCLOSING_CLASSES))
436434
.containsExactly("0:EnclosedThree", "1:EnclosedTwo", "2:EnclosedOne");
437435
}
438436

439437
@Test
440-
@SuppressWarnings("deprecation")
441438
void typeHierarchyWithEnclosedStrategyOnMethodHierarchyUsesTypeHierarchyScan() {
442439
Method source = methodFrom(WithHierarchy.class);
443440
assertThat(scan(source, SearchStrategy.TYPE_HIERARCHY_AND_ENCLOSING_CLASSES)).containsExactly(

spring-core/src/test/java/org/springframework/core/annotation/MergedAnnotationsTests.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,15 +711,13 @@ void streamTypeHierarchyFromClassWithInterface() throws Exception {
711711
}
712712

713713
@Test
714-
@SuppressWarnings("deprecation")
715714
void streamTypeHierarchyAndEnclosingClassesFromNonAnnotatedInnerClassWithAnnotatedEnclosingClass() {
716715
Stream<Class<?>> classes = MergedAnnotations.from(AnnotatedClass.NonAnnotatedInnerClass.class,
717716
SearchStrategy.TYPE_HIERARCHY_AND_ENCLOSING_CLASSES).stream().map(MergedAnnotation::getType);
718717
assertThat(classes).containsExactly(Component.class, Indexed.class);
719718
}
720719

721720
@Test
722-
@SuppressWarnings("deprecation")
723721
void streamTypeHierarchyAndEnclosingClassesFromNonAnnotatedStaticNestedClassWithAnnotatedEnclosingClass() {
724722
Stream<Class<?>> classes = MergedAnnotations.from(AnnotatedClass.NonAnnotatedStaticNestedClass.class,
725723
SearchStrategy.TYPE_HIERARCHY_AND_ENCLOSING_CLASSES).stream().map(MergedAnnotation::getType);

0 commit comments

Comments
 (0)