Skip to content

Commit 5619b00

Browse files
committed
Polishing
1 parent b7819e6 commit 5619b00

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -966,9 +966,8 @@ private static <T> T searchWithGetSemantics(AnnotatedElement element, Class<? ex
966966
}
967967

968968
/**
969-
* This method is invoked by
970-
* {@link #searchWithGetSemantics(AnnotatedElement, Class, String, Processor, Set, int)}
971-
* to perform the actual search within the supplied list of annotations.
969+
* This method is invoked by {@link #searchWithGetSemantics} to perform
970+
* the actual search within the supplied list of annotations.
972971
* <p>This method should be invoked first with locally declared annotations
973972
* and then subsequently with inherited annotations, thereby allowing
974973
* local annotations to take precedence over inherited annotations.
@@ -996,10 +995,9 @@ private static <T> T searchWithGetSemanticsInAnnotations(AnnotatedElement elemen
996995
// Search in annotations
997996
for (Annotation annotation : annotations) {
998997
if (!AnnotationUtils.isInJavaLangAnnotationPackage(annotation)) {
999-
if ((annotation.annotationType() == annotationType
1000-
|| annotation.annotationType().getName().equals(annotationName))
1001-
|| processor.alwaysProcesses()) {
1002-
998+
if (annotation.annotationType() == annotationType ||
999+
annotation.annotationType().getName().equals(annotationName) ||
1000+
processor.alwaysProcesses()) {
10031001
T result = processor.process(element, annotation, metaDepth);
10041002
if (result != null) {
10051003
if (processor.aggregates() && metaDepth == 0) {

0 commit comments

Comments
 (0)