Inline redundant if statements

See gh-39259
This commit is contained in:
Tobias Lippert
2024-01-21 18:42:27 +01:00
committed by Phillip Webb
parent 9cdd0c3776
commit def7523398
18 changed files with 24 additions and 76 deletions

View File

@@ -119,9 +119,7 @@ public class ResetMocksTestExecutionListener extends AbstractTestExecutionListen
String factoryBeanName = BeanFactory.FACTORY_BEAN_PREFIX + name;
if (beanFactory.containsBean(factoryBeanName)) {
FactoryBean<?> factoryBean = (FactoryBean<?>) beanFactory.getBean(factoryBeanName);
if (!factoryBean.isSingleton()) {
return false;
}
return factoryBean.isSingleton();
}
return true;
}