Skip to content

Commit ad3095f

Browse files
committed
Merge branch '5.3.x'
2 parents be8224a + 84b4ceb commit ad3095f

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ private static <C, R> R process(C context, AnnotatedElement source,
9292
}
9393

9494
@Nullable
95+
@SuppressWarnings("deprecation")
9596
private static <C, R> R processClass(C context, Class<?> source,
9697
SearchStrategy searchStrategy, AnnotationsProcessor<C, R> processor) {
9798

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

231232
@Nullable
233+
@SuppressWarnings("deprecation")
232234
private static <C, R> R processMethod(C context, Method source,
233235
SearchStrategy searchStrategy, AnnotationsProcessor<C, R> processor) {
234236

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

504+
@SuppressWarnings("deprecation")
502505
private static boolean isWithoutHierarchy(AnnotatedElement source, SearchStrategy searchStrategy) {
503506
if (source == Object.class) {
504507
return true;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,9 @@ 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
485486
*/
487+
@Deprecated
486488
TYPE_HIERARCHY_AND_ENCLOSING_CLASSES
487489
}
488490

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2022 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,20 +421,23 @@ void typeHierarchyStrategyOnMethodWithGenericParameterNonOverrideScansAnnotation
421421
}
422422

423423
@Test
424+
@SuppressWarnings("deprecation")
424425
void typeHierarchyWithEnclosedStrategyOnEnclosedStaticClassScansAnnotations() {
425426
Class<?> source = AnnotationEnclosingClassSample.EnclosedStatic.EnclosedStaticStatic.class;
426427
assertThat(scan(source, SearchStrategy.TYPE_HIERARCHY_AND_ENCLOSING_CLASSES))
427428
.containsExactly("0:EnclosedThree", "1:EnclosedTwo", "2:EnclosedOne");
428429
}
429430

430431
@Test
432+
@SuppressWarnings("deprecation")
431433
void typeHierarchyWithEnclosedStrategyOnEnclosedInnerClassScansAnnotations() {
432434
Class<?> source = AnnotationEnclosingClassSample.EnclosedInner.EnclosedInnerInner.class;
433435
assertThat(scan(source, SearchStrategy.TYPE_HIERARCHY_AND_ENCLOSING_CLASSES))
434436
.containsExactly("0:EnclosedThree", "1:EnclosedTwo", "2:EnclosedOne");
435437
}
436438

437439
@Test
440+
@SuppressWarnings("deprecation")
438441
void typeHierarchyWithEnclosedStrategyOnMethodHierarchyUsesTypeHierarchyScan() {
439442
Method source = methodFrom(WithHierarchy.class);
440443
assertThat(scan(source, SearchStrategy.TYPE_HIERARCHY_AND_ENCLOSING_CLASSES)).containsExactly(

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

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

713713
@Test
714+
@SuppressWarnings("deprecation")
714715
void streamTypeHierarchyAndEnclosingClassesFromNonAnnotatedInnerClassWithAnnotatedEnclosingClass() {
715716
Stream<Class<?>> classes = MergedAnnotations.from(AnnotatedClass.NonAnnotatedInnerClass.class,
716717
SearchStrategy.TYPE_HIERARCHY_AND_ENCLOSING_CLASSES).stream().map(MergedAnnotation::getType);
717718
assertThat(classes).containsExactly(Component.class, Indexed.class);
718719
}
719720

720721
@Test
722+
@SuppressWarnings("deprecation")
721723
void streamTypeHierarchyAndEnclosingClassesFromNonAnnotatedStaticNestedClassWithAnnotatedEnclosingClass() {
722724
Stream<Class<?>> classes = MergedAnnotations.from(AnnotatedClass.NonAnnotatedStaticNestedClass.class,
723725
SearchStrategy.TYPE_HIERARCHY_AND_ENCLOSING_CLASSES).stream().map(MergedAnnotation::getType);

spring-expression/src/main/java/org/springframework/expression/spel/SpelMessage.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public enum SpelMessage {
258258
FLAWED_PATTERN(Kind.ERROR, 1073,
259259
"Failed to efficiently evaluate pattern ''{0}'': consider redesigning it"),
260260

261-
/** @since 5.3.16 */
261+
/** @since 5.3.17 */
262262
EXCEPTION_COMPILING_EXPRESSION(Kind.ERROR, 1074,
263263
"An exception occurred while compiling an expression");
264264

0 commit comments

Comments
 (0)