Skip to content

Commit 1885ab3

Browse files
committed
Polishing
1 parent de10bb6 commit 1885ab3

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

spring-context/src/main/java/org/springframework/cache/annotation/AbstractCachingConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public CachingConfigurerSupplier(Supplier<CachingConfigurer> supplier) {
124124
public <T> Supplier<T> adapt(Function<CachingConfigurer, T> provider) {
125125
return () -> {
126126
CachingConfigurer cachingConfigurer = this.supplier.get();
127-
return (cachingConfigurer != null) ? provider.apply(cachingConfigurer) : null;
127+
return (cachingConfigurer != null ? provider.apply(cachingConfigurer) : null);
128128
};
129129
}
130130

spring-core/src/main/java/org/springframework/core/type/StandardAnnotationMetadata.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ public Set<MethodMetadata> getAnnotatedMethods(String annotationName) {
162162
throw new IllegalStateException("Failed to introspect annotated methods on " + getIntrospectedClass(), ex);
163163
}
164164
}
165-
return annotatedMethods != null ? annotatedMethods : Collections.emptySet();
165+
return (annotatedMethods != null ? annotatedMethods : Collections.emptySet());
166166
}
167167

168168

spring-core/src/main/java/org/springframework/core/type/classreading/SimpleAnnotationMetadata.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,11 @@ public String[] getMemberClassNames() {
127127
return this.memberClassNames.clone();
128128
}
129129

130+
@Override
131+
public MergedAnnotations getAnnotations() {
132+
return this.annotations;
133+
}
134+
130135
@Override
131136
public Set<String> getAnnotationTypes() {
132137
Set<String> annotationTypes = this.annotationTypes;
@@ -149,13 +154,9 @@ public Set<MethodMetadata> getAnnotatedMethods(String annotationName) {
149154
annotatedMethods.add(annotatedMethod);
150155
}
151156
}
152-
return annotatedMethods != null ? annotatedMethods : Collections.emptySet();
157+
return (annotatedMethods != null ? annotatedMethods : Collections.emptySet());
153158
}
154159

155-
@Override
156-
public MergedAnnotations getAnnotations() {
157-
return this.annotations;
158-
}
159160

160161
@Override
161162
public boolean equals(@Nullable Object obj) {

spring-core/src/main/java/org/springframework/core/type/classreading/SimpleAnnotationMetadataReadingVisitor.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2021 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.
@@ -99,8 +99,7 @@ public void visitOuterClass(String owner, String name, String desc) {
9999
}
100100

101101
@Override
102-
public void visitInnerClass(String name, @Nullable String outerName, String innerName,
103-
int access) {
102+
public void visitInnerClass(String name, @Nullable String outerName, String innerName, int access) {
104103
if (outerName != null) {
105104
String className = toClassName(name);
106105
String outerClassName = toClassName(outerName);

0 commit comments

Comments
 (0)