Avoid annotation attribute lookup in OnBeanCondition

Close gh-13941
This commit is contained in:
dreis2211 2018-07-29 20:41:29 +02:00 committed by Stephane Nicoll
parent 5341b4fb1f
commit 449e1cce9f
1 changed files with 1 additions and 2 deletions

View File

@ -365,8 +365,7 @@ class OnBeanCondition extends SpringBootCondition implements ConfigurationCondit
collect(attributes, "annotation", this.annotations);
collect(attributes, "ignored", this.ignoredTypes);
collect(attributes, "ignoredType", this.ignoredTypes);
this.strategy = (SearchStrategy) metadata
.getAnnotationAttributes(annotationType.getName()).get("search");
this.strategy = (SearchStrategy) attributes.getFirst("search");
BeanTypeDeductionException deductionException = null;
try {
if (this.types.isEmpty() && this.names.isEmpty()) {