Commit d0d6529f authored by Madhura Bhave's avatar Madhura Bhave

Merge pull request #17774 from chenqimiao

* pr/17774:
  Fix typo in assertion

Closes gh-17774
parents 766b6c39 77931a09
...@@ -158,7 +158,8 @@ class OnBeanCondition extends FilteringSpringBootCondition implements Configurat ...@@ -158,7 +158,8 @@ class OnBeanCondition extends FilteringSpringBootCondition implements Configurat
ConfigurableListableBeanFactory beanFactory = context.getBeanFactory(); ConfigurableListableBeanFactory beanFactory = context.getBeanFactory();
if (beans.getStrategy() == SearchStrategy.ANCESTORS) { if (beans.getStrategy() == SearchStrategy.ANCESTORS) {
BeanFactory parent = beanFactory.getParentBeanFactory(); BeanFactory parent = beanFactory.getParentBeanFactory();
Assert.isInstanceOf(ConfigurableListableBeanFactory.class, parent, "Unable to use SearchStrategy.PARENTS"); Assert.isInstanceOf(ConfigurableListableBeanFactory.class, parent,
"Unable to use SearchStrategy.ANCESTORS");
beanFactory = (ConfigurableListableBeanFactory) parent; beanFactory = (ConfigurableListableBeanFactory) parent;
} }
MatchResult matchResult = new MatchResult(); MatchResult matchResult = new MatchResult();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment