Skip to content

Commit 2c8d1b7

Browse files
committed
Polishing
1 parent bd63c35 commit 2c8d1b7

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

spring-context/src/main/java/org/springframework/scheduling/concurrent/ExecutorConfigurationSupport.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@
3636
* Base class for setting up a {@link java.util.concurrent.ExecutorService}
3737
* (typically a {@link java.util.concurrent.ThreadPoolExecutor} or
3838
* {@link java.util.concurrent.ScheduledThreadPoolExecutor}).
39-
* Defines common configuration settings and common lifecycle handling.
39+
*
40+
* <p>Defines common configuration settings and common lifecycle handling,
41+
* inheriting thread customization options (name, priority, etc) from
42+
* {@link org.springframework.util.CustomizableThreadCreator}.
4043
*
4144
* @author Juergen Hoeller
4245
* @since 3.0
@@ -199,8 +202,7 @@ protected abstract ExecutorService initializeExecutor(
199202

200203

201204
/**
202-
* Calls {@code shutdown} when the BeanFactory destroys
203-
* the task executor instance.
205+
* Calls {@code shutdown} when the BeanFactory destroys the executor instance.
204206
* @see #shutdown()
205207
*/
206208
@Override

spring-context/src/test/java/org/springframework/context/support/GenericApplicationContextTests.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,13 @@ class GenericApplicationContextTests {
7676

7777
private final GenericApplicationContext context = new GenericApplicationContext();
7878

79+
7980
@AfterEach
8081
void closeContext() {
8182
context.close();
8283
}
8384

85+
8486
@Test
8587
void getBeanForClass() {
8688
context.registerBeanDefinition("testBean", new RootBeanDefinition(String.class));
@@ -91,7 +93,7 @@ void getBeanForClass() {
9193
assertThat(context.getBean(CharSequence.class)).isSameAs(context.getBean("testBean"));
9294

9395
assertThatExceptionOfType(NoUniqueBeanDefinitionException.class)
94-
.isThrownBy(() -> context.getBean(Object.class));
96+
.isThrownBy(() -> context.getBean(Object.class));
9597
}
9698

9799
@Test
@@ -509,6 +511,7 @@ public Class<?> determineBeanType(Class<?> beanClass, String beanName) throws Be
509511
context.close();
510512
}
511513

514+
512515
private MergedBeanDefinitionPostProcessor registerMockMergedBeanDefinitionPostProcessor(GenericApplicationContext context) {
513516
MergedBeanDefinitionPostProcessor bpp = mock();
514517
context.registerBeanDefinition("bpp", BeanDefinitionBuilder.rootBeanDefinition(
@@ -563,9 +566,9 @@ public BeanD() {
563566
public void setCounter(Integer counter) {
564567
this.counter = counter;
565568
}
566-
567569
}
568570

571+
569572
static class TestAotFactoryBean<T> extends AbstractFactoryBean<T> {
570573

571574
TestAotFactoryBean() {
@@ -584,6 +587,7 @@ protected T createInstance() {
584587
}
585588
}
586589

590+
587591
static class PingPongProtocolResolver implements ProtocolResolver {
588592

589593
@Override

0 commit comments

Comments
 (0)