Polish
This commit changes invocations to immediately return the expression instead of assigning it to a temporary variable. The method name should be sufficient for callers to know exactly what will be returned. Closes gh-12211
This commit is contained in:
committed by
Stephane Nicoll
parent
c27fa7bf91
commit
98f4692c62
@@ -112,8 +112,7 @@ class ImportsContextCustomizer implements ContextCustomizer {
|
||||
private BeanDefinition registerBean(BeanDefinitionRegistry registry,
|
||||
AnnotatedBeanDefinitionReader reader, String beanName, Class<?> type) {
|
||||
reader.registerBean(type, beanName);
|
||||
BeanDefinition definition = registry.getBeanDefinition(beanName);
|
||||
return definition;
|
||||
return registry.getBeanDefinition(beanName);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -135,8 +135,7 @@ public class SpringBootContextLoader extends AbstractContextLoader {
|
||||
application.setWebApplicationType(WebApplicationType.NONE);
|
||||
}
|
||||
application.setInitializers(initializers);
|
||||
ConfigurableApplicationContext context = application.run();
|
||||
return context;
|
||||
return application.run();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user