Skip to content

Commit f71e219

Browse files
committed
Merge pull request #28494 from izeye
* pr/28494: Polish Closes gh-28494
2 parents 51dc02e + 5d8dce7 commit f71e219

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/amqp/RabbitProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -900,7 +900,7 @@ public static class StreamContainer extends BaseContainer {
900900
* Whether the container will support listeners that consume native stream
901901
* messages instead of Spring AMQP messages.
902902
*/
903-
boolean nativeListener;
903+
private boolean nativeListener;
904904

905905
public boolean isNativeListener() {
906906
return this.nativeListener;

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/scan/ScanBean.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
public class ScanBean {
2020

21-
private String value;
21+
private final String value;
2222

2323
public ScanBean(String value) {
2424
this.value = value;

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/SpringApplication.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,11 @@ public ConfigurableApplicationContext run(String... args) {
301301
prepareContext(bootstrapContext, context, environment, listeners, applicationArguments, printedBanner);
302302
refreshContext(context);
303303
afterRefresh(context, applicationArguments);
304-
Duration timeTakeToStartup = Duration.ofNanos(System.nanoTime() - startTime);
304+
Duration timeTakenToStartup = Duration.ofNanos(System.nanoTime() - startTime);
305305
if (this.logStartupInfo) {
306-
new StartupInfoLogger(this.mainApplicationClass).logStarted(getApplicationLog(), timeTakeToStartup);
306+
new StartupInfoLogger(this.mainApplicationClass).logStarted(getApplicationLog(), timeTakenToStartup);
307307
}
308-
listeners.started(context, timeTakeToStartup);
308+
listeners.started(context, timeTakenToStartup);
309309
callRunners(context, applicationArguments);
310310
}
311311
catch (Throwable ex) {

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/StartupInfoLogger.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ void logStarting(Log applicationLog) {
5656
applicationLog.debug(LogMessage.of(this::getRunningMessage));
5757
}
5858

59-
void logStarted(Log applicationLog, Duration timeTakeToStartup) {
59+
void logStarted(Log applicationLog, Duration timeTakenToStartup) {
6060
if (applicationLog.isInfoEnabled()) {
61-
applicationLog.info(getStartedMessage(timeTakeToStartup));
61+
applicationLog.info(getStartedMessage(timeTakenToStartup));
6262
}
6363
}
6464

@@ -83,12 +83,12 @@ private CharSequence getRunningMessage() {
8383
return message;
8484
}
8585

86-
private CharSequence getStartedMessage(Duration timeTakeToStartup) {
86+
private CharSequence getStartedMessage(Duration timeTakenToStartup) {
8787
StringBuilder message = new StringBuilder();
8888
message.append("Started ");
8989
appendApplicationName(message);
9090
message.append(" in ");
91-
message.append(timeTakeToStartup.toMillis() / 1000.0);
91+
message.append(timeTakenToStartup.toMillis() / 1000.0);
9292
message.append(" seconds");
9393
try {
9494
double uptime = ManagementFactory.getRuntimeMXBean().getUptime() / 1000.0;

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/builder/SpringApplicationBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ public SpringApplicationBuilder applicationStartup(ApplicationStartup applicatio
604604
/**
605605
* Whether to allow circular references between beans and automatically try to resolve
606606
* them.
607-
* @param allowCircularReferences whether circular references are allows
607+
* @param allowCircularReferences whether circular references are allowed
608608
* @return the current builder
609609
* @since 2.6.0
610610
* @see AbstractAutowireCapableBeanFactory#setAllowCircularReferences(boolean)

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/StartupInfoLoggerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ void startingFormat() throws UnknownHostException {
5656
@Test
5757
void startedFormat() {
5858
given(this.log.isInfoEnabled()).willReturn(true);
59-
Duration timeTakeToStartup = Duration.ofMillis(10);
60-
new StartupInfoLogger(getClass()).logStarted(this.log, timeTakeToStartup);
59+
Duration timeTakenToStartup = Duration.ofMillis(10);
60+
new StartupInfoLogger(getClass()).logStarted(this.log, timeTakenToStartup);
6161
ArgumentCaptor<Object> captor = ArgumentCaptor.forClass(Object.class);
6262
verify(this.log).info(captor.capture());
6363
assertThat(captor.getValue().toString()).matches("Started " + getClass().getSimpleName()

0 commit comments

Comments
 (0)