Browse Source

Polish

This commit polishes a bit.

Closes gh-30691
pull/30739/head
Johnny Lim 3 years ago committed by Sam Brannen
parent
commit
3be1216897
  1. 4
      spring-beans/src/main/java/org/springframework/beans/factory/config/YamlProcessor.java
  2. 10
      spring-core/src/test/java21/org/springframework/core/task/VirtualThreadTaskExecutorTests.java

4
spring-beans/src/main/java/org/springframework/beans/factory/config/YamlProcessor.java

@ -135,7 +135,7 @@ public abstract class YamlProcessor { @@ -135,7 +135,7 @@ public abstract class YamlProcessor {
* <p>If no supported types are configured, only Java standard classes
* (as defined in {@link org.yaml.snakeyaml.constructor.SafeConstructor})
* encountered in YAML documents will be supported.
* If an unsupported type is encountered, an {@link ComposerException}
* If an unsupported type is encountered, a {@link ComposerException}
* will be thrown when the corresponding YAML node is processed.
* @param supportedTypes the supported types, or an empty array to clear the
* supported types
@ -180,7 +180,7 @@ public abstract class YamlProcessor { @@ -180,7 +180,7 @@ public abstract class YamlProcessor {
* <p>If custom {@linkplain #setSupportedTypes supported types} have been configured,
* the default implementation creates a {@code Yaml} instance that filters out
* unsupported types encountered in YAML documents.
* If an unsupported type is encountered, an {@link ComposerException} will be
* If an unsupported type is encountered, a {@link ComposerException} will be
* thrown when the node is processed.
* @see LoaderOptions#setAllowDuplicateKeys(boolean)
*/

10
spring-core/src/test/java21/org/springframework/core/task/VirtualThreadTaskExecutorTests.java

@ -36,7 +36,7 @@ class VirtualThreadTaskExecutorTests { @@ -36,7 +36,7 @@ class VirtualThreadTaskExecutorTests {
executeAndWait(executor, task, monitor);
assertThat(task.getThreadName()).isEmpty();
assertThat(task.isVirtual()).isTrue();
assertThat(task.runtCount()).isOne();
assertThat(task.runCount()).isOne();
}
@Test
@ -47,7 +47,7 @@ class VirtualThreadTaskExecutorTests { @@ -47,7 +47,7 @@ class VirtualThreadTaskExecutorTests {
executeAndWait(executor, task, monitor);
assertThat(task.getThreadName()).isEqualTo("test-0");
assertThat(task.isVirtual()).isTrue();
assertThat(task.runtCount()).isOne();
assertThat(task.runCount()).isOne();
}
@Test
@ -58,7 +58,7 @@ class VirtualThreadTaskExecutorTests { @@ -58,7 +58,7 @@ class VirtualThreadTaskExecutorTests {
executeAndWait(executor, task, monitor);
assertThat(task.getThreadName()).isEqualTo("test");
assertThat(task.isVirtual()).isTrue();
assertThat(task.runtCount()).isOne();
assertThat(task.runCount()).isOne();
}
@Test
@ -71,7 +71,7 @@ class VirtualThreadTaskExecutorTests { @@ -71,7 +71,7 @@ class VirtualThreadTaskExecutorTests {
executeAndWait(executor, task, monitor);
assertThat(task.getThreadName()).startsWith(customPrefix);
assertThat(task.isVirtual()).isTrue();
assertThat(task.runtCount()).isOne();
assertThat(task.runCount()).isOne();
}
private void executeAndWait(TaskExecutor executor, Runnable task, Object monitor) {
@ -139,7 +139,7 @@ class VirtualThreadTaskExecutorTests { @@ -139,7 +139,7 @@ class VirtualThreadTaskExecutorTests {
return this.virtual;
}
public int runtCount() {
public int runCount() {
return this.runCount.get();
}

Loading…
Cancel
Save