Polishing

This commit is contained in:
Juergen Hoeller 2021-12-15 17:58:28 +01:00
parent de10bb69cb
commit 1885ab3e07
4 changed files with 10 additions and 10 deletions

View File

@ -124,7 +124,7 @@ public abstract class AbstractCachingConfiguration implements ImportAware {
public <T> Supplier<T> adapt(Function<CachingConfigurer, T> provider) { public <T> Supplier<T> adapt(Function<CachingConfigurer, T> provider) {
return () -> { return () -> {
CachingConfigurer cachingConfigurer = this.supplier.get(); CachingConfigurer cachingConfigurer = this.supplier.get();
return (cachingConfigurer != null) ? provider.apply(cachingConfigurer) : null; return (cachingConfigurer != null ? provider.apply(cachingConfigurer) : null);
}; };
} }

View File

@ -162,7 +162,7 @@ public class StandardAnnotationMetadata extends StandardClassMetadata implements
throw new IllegalStateException("Failed to introspect annotated methods on " + getIntrospectedClass(), ex); throw new IllegalStateException("Failed to introspect annotated methods on " + getIntrospectedClass(), ex);
} }
} }
return annotatedMethods != null ? annotatedMethods : Collections.emptySet(); return (annotatedMethods != null ? annotatedMethods : Collections.emptySet());
} }

View File

@ -127,6 +127,11 @@ final class SimpleAnnotationMetadata implements AnnotationMetadata {
return this.memberClassNames.clone(); return this.memberClassNames.clone();
} }
@Override
public MergedAnnotations getAnnotations() {
return this.annotations;
}
@Override @Override
public Set<String> getAnnotationTypes() { public Set<String> getAnnotationTypes() {
Set<String> annotationTypes = this.annotationTypes; Set<String> annotationTypes = this.annotationTypes;
@ -149,13 +154,9 @@ final class SimpleAnnotationMetadata implements AnnotationMetadata {
annotatedMethods.add(annotatedMethod); annotatedMethods.add(annotatedMethod);
} }
} }
return annotatedMethods != null ? annotatedMethods : Collections.emptySet(); return (annotatedMethods != null ? annotatedMethods : Collections.emptySet());
} }
@Override
public MergedAnnotations getAnnotations() {
return this.annotations;
}
@Override @Override
public boolean equals(@Nullable Object obj) { public boolean equals(@Nullable Object obj) {

View File

@ -1,5 +1,5 @@
/* /*
* Copyright 2002-2019 the original author or authors. * Copyright 2002-2021 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -99,8 +99,7 @@ final class SimpleAnnotationMetadataReadingVisitor extends ClassVisitor {
} }
@Override @Override
public void visitInnerClass(String name, @Nullable String outerName, String innerName, public void visitInnerClass(String name, @Nullable String outerName, String innerName, int access) {
int access) {
if (outerName != null) { if (outerName != null) {
String className = toClassName(name); String className = toClassName(name);
String outerClassName = toClassName(outerName); String outerClassName = toClassName(outerName);