Use MergedAnnotation.getRoot() method

Closes gh-16661
pull/16699/head
Madhura Bhave 6 years ago
parent 8b30ad21bb
commit fd97066604

@ -179,7 +179,7 @@
<snakeyaml.version>1.24</snakeyaml.version>
<solr.version>8.0.0</solr.version>
<!-- deprecated in favor of "spring-framework.version" -->
<spring.version>5.2.0.M1</spring.version>
<spring.version>5.2.0.BUILD-SNAPSHOT</spring.version>
<spring-amqp.version>2.2.0.M1</spring-amqp.version>
<spring-batch.version>4.2.0.M1</spring-batch.version>
<spring-cloud-connectors.version>2.0.5.RELEASE</spring-cloud-connectors.version>

@ -114,11 +114,8 @@ class ConfigurationPropertiesScanRegistrar
.from(type, MergedAnnotations.SearchStrategy.EXHAUSTIVE)
.get(Component.class);
if (component.isPresent()) {
MergedAnnotation<?> parent = component;
while (parent.getParent() != null) {
parent = parent.getParent();
}
throw new InvalidConfigurationPropertiesException(type, parent.getType());
throw new InvalidConfigurationPropertiesException(type,
component.getRoot().getType());
}
}

Loading…
Cancel
Save