Polishing

This commit is contained in:
Juergen Hoeller 2023-06-07 17:21:59 +02:00
parent bd63c35b0b
commit 2c8d1b7bff
2 changed files with 11 additions and 5 deletions

View File

@ -36,7 +36,10 @@ import org.springframework.lang.Nullable;
* Base class for setting up a {@link java.util.concurrent.ExecutorService}
* (typically a {@link java.util.concurrent.ThreadPoolExecutor} or
* {@link java.util.concurrent.ScheduledThreadPoolExecutor}).
* Defines common configuration settings and common lifecycle handling.
*
* <p>Defines common configuration settings and common lifecycle handling,
* inheriting thread customization options (name, priority, etc) from
* {@link org.springframework.util.CustomizableThreadCreator}.
*
* @author Juergen Hoeller
* @since 3.0
@ -199,8 +202,7 @@ public abstract class ExecutorConfigurationSupport extends CustomizableThreadFac
/**
* Calls {@code shutdown} when the BeanFactory destroys
* the task executor instance.
* Calls {@code shutdown} when the BeanFactory destroys the executor instance.
* @see #shutdown()
*/
@Override

View File

@ -76,11 +76,13 @@ class GenericApplicationContextTests {
private final GenericApplicationContext context = new GenericApplicationContext();
@AfterEach
void closeContext() {
context.close();
}
@Test
void getBeanForClass() {
context.registerBeanDefinition("testBean", new RootBeanDefinition(String.class));
@ -91,7 +93,7 @@ class GenericApplicationContextTests {
assertThat(context.getBean(CharSequence.class)).isSameAs(context.getBean("testBean"));
assertThatExceptionOfType(NoUniqueBeanDefinitionException.class)
.isThrownBy(() -> context.getBean(Object.class));
.isThrownBy(() -> context.getBean(Object.class));
}
@Test
@ -509,6 +511,7 @@ class GenericApplicationContextTests {
context.close();
}
private MergedBeanDefinitionPostProcessor registerMockMergedBeanDefinitionPostProcessor(GenericApplicationContext context) {
MergedBeanDefinitionPostProcessor bpp = mock();
context.registerBeanDefinition("bpp", BeanDefinitionBuilder.rootBeanDefinition(
@ -563,9 +566,9 @@ class GenericApplicationContextTests {
public void setCounter(Integer counter) {
this.counter = counter;
}
}
static class TestAotFactoryBean<T> extends AbstractFactoryBean<T> {
TestAotFactoryBean() {
@ -584,6 +587,7 @@ class GenericApplicationContextTests {
}
}
static class PingPongProtocolResolver implements ProtocolResolver {
@Override