Merge pull request #38241 from audtjddld
* pr/38241: Fix typo Closes gh-38241
This commit is contained in:
@@ -298,7 +298,7 @@ public class SpringApplication {
|
||||
*/
|
||||
public ConfigurableApplicationContext run(String... args) {
|
||||
if (this.registerShutdownHook) {
|
||||
SpringApplication.shutdownHook.enableShutdowHookAddition();
|
||||
SpringApplication.shutdownHook.enableShutdownHookAddition();
|
||||
}
|
||||
long startTime = System.nanoTime();
|
||||
DefaultBootstrapContext bootstrapContext = createBootstrapContext();
|
||||
|
||||
@@ -70,7 +70,7 @@ class SpringApplicationShutdownHook implements Runnable {
|
||||
return this.handlers;
|
||||
}
|
||||
|
||||
void enableShutdowHookAddition() {
|
||||
void enableShutdownHookAddition() {
|
||||
this.shutdownHookAdditionEnabled = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ class SpringApplicationShutdownHookTests {
|
||||
@Test
|
||||
void shutdownHookIsNotAddedUntilContextIsRegistered() {
|
||||
TestSpringApplicationShutdownHook shutdownHook = new TestSpringApplicationShutdownHook();
|
||||
shutdownHook.enableShutdowHookAddition();
|
||||
shutdownHook.enableShutdownHookAddition();
|
||||
assertThat(shutdownHook.isRuntimeShutdownHookAdded()).isFalse();
|
||||
ConfigurableApplicationContext context = new GenericApplicationContext();
|
||||
shutdownHook.registerApplicationContext(context);
|
||||
@@ -61,7 +61,7 @@ class SpringApplicationShutdownHookTests {
|
||||
@Test
|
||||
void shutdownHookIsNotAddedUntilHandlerIsRegistered() {
|
||||
TestSpringApplicationShutdownHook shutdownHook = new TestSpringApplicationShutdownHook();
|
||||
shutdownHook.enableShutdowHookAddition();
|
||||
shutdownHook.enableShutdownHookAddition();
|
||||
assertThat(shutdownHook.isRuntimeShutdownHookAdded()).isFalse();
|
||||
shutdownHook.getHandlers().add(() -> {
|
||||
});
|
||||
@@ -74,7 +74,7 @@ class SpringApplicationShutdownHookTests {
|
||||
shutdownHook.getHandlers().add(() -> {
|
||||
});
|
||||
assertThat(shutdownHook.isRuntimeShutdownHookAdded()).isFalse();
|
||||
shutdownHook.enableShutdowHookAddition();
|
||||
shutdownHook.enableShutdownHookAddition();
|
||||
shutdownHook.getHandlers().add(() -> {
|
||||
});
|
||||
assertThat(shutdownHook.isRuntimeShutdownHookAdded()).isTrue();
|
||||
|
||||
Reference in New Issue
Block a user