Nullability refinements and related polishing

This commit is contained in:
Juergen Hoeller
2019-05-08 00:27:56 +02:00
parent c5b3848357
commit cdf51c3d51
3 changed files with 29 additions and 39 deletions

View File

@@ -211,9 +211,8 @@ final class ConfigurationClass {
public void validate(ProblemReporter problemReporter) {
// A configuration class may not be final (CGLIB limitation) unless it declares proxyBeanMethods=false
String annotationName = Configuration.class.getName();
if (this.metadata.isAnnotated(annotationName) &&
(Boolean) this.metadata.getAnnotationAttributes(annotationName).get("proxyBeanMethods")) {
Map<String, Object> attributes = this.metadata.getAnnotationAttributes(Configuration.class.getName());
if (attributes != null && (Boolean) attributes.get("proxyBeanMethods")) {
if (this.metadata.isFinal()) {
problemReporter.error(new FinalConfigurationProblem());
}