diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java index ac8fc182ad..f959863a1b 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java @@ -900,7 +900,7 @@ public class RabbitProperties { * Whether the container will support listeners that consume native stream * messages instead of Spring AMQP messages. */ - boolean nativeListener; + private boolean nativeListener; public boolean isNativeListener() { return this.nativeListener; diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/scan/ScanBean.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/scan/ScanBean.java index 2bb12a7756..b3bc4a3b16 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/scan/ScanBean.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/scan/ScanBean.java @@ -18,7 +18,7 @@ package org.springframework.boot.autoconfigure.condition.scan; public class ScanBean { - private String value; + private final String value; public ScanBean(String value) { this.value = value; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java index 2f3f19ba92..b03aa75c1f 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java @@ -301,11 +301,11 @@ public class SpringApplication { prepareContext(bootstrapContext, context, environment, listeners, applicationArguments, printedBanner); refreshContext(context); afterRefresh(context, applicationArguments); - Duration timeTakeToStartup = Duration.ofNanos(System.nanoTime() - startTime); + Duration timeTakenToStartup = Duration.ofNanos(System.nanoTime() - startTime); if (this.logStartupInfo) { - new StartupInfoLogger(this.mainApplicationClass).logStarted(getApplicationLog(), timeTakeToStartup); + new StartupInfoLogger(this.mainApplicationClass).logStarted(getApplicationLog(), timeTakenToStartup); } - listeners.started(context, timeTakeToStartup); + listeners.started(context, timeTakenToStartup); callRunners(context, applicationArguments); } catch (Throwable ex) { diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/StartupInfoLogger.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/StartupInfoLogger.java index 35a8629c27..aa79a5c65e 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/StartupInfoLogger.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/StartupInfoLogger.java @@ -56,9 +56,9 @@ class StartupInfoLogger { applicationLog.debug(LogMessage.of(this::getRunningMessage)); } - void logStarted(Log applicationLog, Duration timeTakeToStartup) { + void logStarted(Log applicationLog, Duration timeTakenToStartup) { if (applicationLog.isInfoEnabled()) { - applicationLog.info(getStartedMessage(timeTakeToStartup)); + applicationLog.info(getStartedMessage(timeTakenToStartup)); } } @@ -83,12 +83,12 @@ class StartupInfoLogger { return message; } - private CharSequence getStartedMessage(Duration timeTakeToStartup) { + private CharSequence getStartedMessage(Duration timeTakenToStartup) { StringBuilder message = new StringBuilder(); message.append("Started "); appendApplicationName(message); message.append(" in "); - message.append(timeTakeToStartup.toMillis() / 1000.0); + message.append(timeTakenToStartup.toMillis() / 1000.0); message.append(" seconds"); try { double uptime = ManagementFactory.getRuntimeMXBean().getUptime() / 1000.0; diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java index 515fe29cfc..ac18433f34 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java @@ -604,7 +604,7 @@ public class SpringApplicationBuilder { /** * Whether to allow circular references between beans and automatically try to resolve * them. - * @param allowCircularReferences whether circular references are allows + * @param allowCircularReferences whether circular references are allowed * @return the current builder * @since 2.6.0 * @see AbstractAutowireCapableBeanFactory#setAllowCircularReferences(boolean) diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/StartupInfoLoggerTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/StartupInfoLoggerTests.java index 4f41da83a6..3910168266 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/StartupInfoLoggerTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/StartupInfoLoggerTests.java @@ -56,8 +56,8 @@ class StartupInfoLoggerTests { @Test void startedFormat() { given(this.log.isInfoEnabled()).willReturn(true); - Duration timeTakeToStartup = Duration.ofMillis(10); - new StartupInfoLogger(getClass()).logStarted(this.log, timeTakeToStartup); + Duration timeTakenToStartup = Duration.ofMillis(10); + new StartupInfoLogger(getClass()).logStarted(this.log, timeTakenToStartup); ArgumentCaptor captor = ArgumentCaptor.forClass(Object.class); verify(this.log).info(captor.capture()); assertThat(captor.getValue().toString()).matches("Started " + getClass().getSimpleName()