Skip to content

Commit 175b647

Browse files
izeyemhalbritter
authored andcommitted
Polish
See gh-38389
1 parent 9c43ed7 commit 175b647

File tree

14 files changed

+23
-32
lines changed

14 files changed

+23
-32
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/wavefront/WavefrontSenderConfigurationTests.java

+4-9
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
3131
import org.springframework.context.annotation.Bean;
3232
import org.springframework.context.annotation.Configuration;
33-
import org.springframework.test.util.ReflectionTestUtils;
3433

3534
import static org.assertj.core.api.Assertions.as;
3635
import static org.assertj.core.api.Assertions.assertThat;
@@ -129,8 +128,7 @@ void shouldApplyTokenTypeWavefrontApiToken() {
129128
"management.wavefront.api-token=abcde")
130129
.run((context) -> {
131130
WavefrontSender sender = context.getBean(WavefrontSender.class);
132-
Object tokenService = ReflectionTestUtils.getField(sender, "tokenService");
133-
assertThat(tokenService).isInstanceOf(WavefrontTokenService.class);
131+
assertThat(sender).extracting("tokenService").isInstanceOf(WavefrontTokenService.class);
134132
});
135133
}
136134

@@ -141,8 +139,7 @@ void shouldApplyTokenTypeCspApiToken() {
141139
"management.wavefront.api-token=abcde")
142140
.run((context) -> {
143141
WavefrontSender sender = context.getBean(WavefrontSender.class);
144-
Object tokenService = ReflectionTestUtils.getField(sender, "tokenService");
145-
assertThat(tokenService).isInstanceOf(CSPTokenService.class);
142+
assertThat(sender).extracting("tokenService").isInstanceOf(CSPTokenService.class);
146143
});
147144
}
148145

@@ -153,17 +150,15 @@ void shouldApplyTokenTypeCspClientCredentials() {
153150
"management.wavefront.api-token=clientid=cid,clientsecret=csec")
154151
.run((context) -> {
155152
WavefrontSender sender = context.getBean(WavefrontSender.class);
156-
Object tokenService = ReflectionTestUtils.getField(sender, "tokenService");
157-
assertThat(tokenService).isInstanceOf(CSPTokenService.class);
153+
assertThat(sender).extracting("tokenService").isInstanceOf(CSPTokenService.class);
158154
});
159155
}
160156

161157
@Test
162158
void shouldApplyTokenTypeNoToken() {
163159
this.contextRunner.withPropertyValues("management.wavefront.api-token-type=NO_TOKEN").run((context) -> {
164160
WavefrontSender sender = context.getBean(WavefrontSender.class);
165-
Object tokenService = ReflectionTestUtils.getField(sender, "tokenService");
166-
assertThat(tokenService).isInstanceOf(NoopProxyTokenService.class);
161+
assertThat(sender).extracting("tokenService").isInstanceOf(NoopProxyTokenService.class);
167162
});
168163
}
169164

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/mail/MailHealthIndicatorTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void smtpOnDefaultHostAndPortIsDown() throws MessagingException {
8181
assertThat(health.getDetails()).doesNotContainKey("location");
8282
Object errorMessage = health.getDetails().get("error");
8383
assertThat(errorMessage).isNotNull();
84-
assertThat(errorMessage.toString().contains("A test exception")).isTrue();
84+
assertThat(errorMessage.toString()).contains("A test exception");
8585
}
8686

8787
@Test
@@ -104,7 +104,7 @@ void smtpOnDefaultHostAndCustomPortIsDown() throws MessagingException {
104104
assertThat(health.getDetails().get("location")).isEqualTo(":1234");
105105
Object errorMessage = health.getDetails().get("error");
106106
assertThat(errorMessage).isNotNull();
107-
assertThat(errorMessage.toString().contains("A test exception")).isTrue();
107+
assertThat(errorMessage.toString()).contains("A test exception");
108108
}
109109

110110
@Test
@@ -125,7 +125,7 @@ void smtpOnDefaultPortIsDown() throws MessagingException {
125125
assertThat(health.getDetails()).containsEntry("location", "smtp.acme.org");
126126
Object errorMessage = health.getDetails().get("error");
127127
assertThat(errorMessage).isNotNull();
128-
assertThat(errorMessage.toString().contains("A test exception")).isTrue();
128+
assertThat(errorMessage.toString()).contains("A test exception");
129129
}
130130

131131
@Test

spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration
9797
org.springframework.boot.autoconfigure.pulsar.PulsarAutoConfiguration
9898
org.springframework.boot.autoconfigure.pulsar.PulsarReactiveAutoConfiguration
9999
org.springframework.boot.autoconfigure.quartz.QuartzAutoConfiguration
100-
org.springframework.boot.autoconfigure.reactor.ReactorAutoConfiguration
101100
org.springframework.boot.autoconfigure.r2dbc.R2dbcAutoConfiguration
102101
org.springframework.boot.autoconfigure.r2dbc.R2dbcTransactionManagerAutoConfiguration
102+
org.springframework.boot.autoconfigure.reactor.ReactorAutoConfiguration
103103
org.springframework.boot.autoconfigure.rsocket.RSocketMessagingAutoConfiguration
104104
org.springframework.boot.autoconfigure.rsocket.RSocketRequesterAutoConfiguration
105105
org.springframework.boot.autoconfigure.rsocket.RSocketServerAutoConfiguration

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jackson/JacksonAutoConfigurationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ void enableEnumFeature() {
304304

305305
@Test
306306
void disableJsonNodeFeature() {
307-
this.contextRunner.withPropertyValues("spring.jackson.datatype.jsonnode.write-null-properties:false")
307+
this.contextRunner.withPropertyValues("spring.jackson.datatype.json-node.write-null-properties:false")
308308
.run((context) -> {
309309
ObjectMapper mapper = context.getBean(ObjectMapper.class);
310310
assertThat(JsonNodeFeature.WRITE_NULL_PROPERTIES.enabledByDefault()).isTrue();

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/client/RestTemplateAutoConfigurationTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ void restTemplateBuilderConfigurerShouldBeLazilyDefined() {
6868

6969
@Test
7070
void shouldFailOnCustomRestTemplateBuilderConfigurer() {
71-
this.contextRunner.withUserConfiguration(RestTemplateCustomConfigurerConfig.class)
71+
this.contextRunner.withUserConfiguration(RestTemplateBuilderConfigurerConfig.class)
7272
.run((context) -> assertThat(context).getFailure()
7373
.isInstanceOf(BeanDefinitionOverrideException.class)
7474
.hasMessageContaining("with name 'restTemplateBuilderConfigurer'"));
@@ -273,7 +273,7 @@ RestTemplateRequestCustomizer<?> restTemplateRequestCustomizer() {
273273
}
274274

275275
@Configuration(proxyBeanMethods = false)
276-
static class RestTemplateCustomConfigurerConfig {
276+
static class RestTemplateBuilderConfigurerConfig {
277277

278278
@Bean
279279
RestTemplateBuilderConfigurer restTemplateBuilderConfigurer() {

spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/docker-compose.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ With this Docker Compose file in place, the JDBC URL used is `jdbc:postgresql://
3535
If you want to share services between multiple applications, create the `compose.yaml` file in one of the applications and then use the configuration property configprop:spring.docker.compose.file[] in the other applications to reference the `compose.yaml` file.
3636
You should also set configprop:spring.docker.compose.lifecycle-management[] to `start-only`, as it defaults to `start-and-stop` and stopping one application would shut down the shared services for the other still running applications, too.
3737
Setting it to `start-only` won't stop the shared services on application stop, but a caveat is that if you shut down all applications, the services stay running.
38-
You can stop the services manually by running `docker compose stop` on the commandline in the directory which contains the `compose.yaml` file.
38+
You can stop the services manually by running `docker compose stop` on the command line in the directory which contains the `compose.yaml` file.

spring-boot-project/spring-boot-docs/src/docs/asciidoc/howto/spring-mvc.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ These features are described in several enums (in Jackson) that map onto propert
7575
| `true`, `false`
7676

7777
| `com.fasterxml.jackson.databind.cfg.JsonNodeFeature`
78-
| `spring.jackson.datatype.jsonnode.<feature_name>`
78+
| `spring.jackson.datatype.json-node.<feature_name>`
7979
| `true`, `false`
8080

8181
| `com.fasterxml.jackson.databind.DeserializationFeature`

spring-boot-project/spring-boot-docs/src/docs/asciidoc/io/rest-client.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you have Spring WebFlux on your classpath we recommend that you use `WebClien
1212
The `WebClient` interface provides a functional style API and is fully reactive.
1313
You can learn more about the `WebClient` in the dedicated {spring-framework-docs}/web/webflux-webclient.html[section in the Spring Framework docs].
1414

15-
TIP: If you are not writing a reactive Spring WebFlux application you can use the a <<io#io.rest-client.restclient,`RestClient`>> instead of a `WebClient`.
15+
TIP: If you are not writing a reactive Spring WebFlux application you can use the <<io#io.rest-client.restclient,`RestClient`>> instead of a `WebClient`.
1616
This provides a similar functional API, but is blocking rather than reactive.
1717

1818
Spring Boot creates and pre-configures a prototype `WebClient.Builder` bean for you.

spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/reactive.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ Usually, you would define the properties in your `application.properties` or `ap
271271

272272
Common server settings include:
273273

274-
* Network settings: Listen port for incoming HTTP requests (`server.port`), interface address to bind to `server.address`, and so on.
274+
* Network settings: Listen port for incoming HTTP requests (`server.port`), interface address to bind to (`server.address`), and so on.
275275
* Error management: Location of the error page (`server.error.path`) and so on.
276276
* <<howto#howto.webserver.configure-ssl,SSL>>
277277
* <<howto#howto.webserver.enable-response-compression,HTTP compression>>
@@ -291,7 +291,7 @@ The following example shows programmatically setting the port:
291291

292292
include::code:MyWebServerFactoryCustomizer[]
293293

294-
`JettyReactiveWebServerFactory`, `NettyReactiveWebServerFactory`, `TomcatReactiveWebServerFactory`, and `UndertowServletWebServerFactory` are dedicated variants of `ConfigurableReactiveWebServerFactory` that have additional customization setter methods for Jetty, Reactor Netty, Tomcat, and Undertow respectively.
294+
`JettyReactiveWebServerFactory`, `NettyReactiveWebServerFactory`, `TomcatReactiveWebServerFactory`, and `UndertowReactiveWebServerFactory` are dedicated variants of `ConfigurableReactiveWebServerFactory` that have additional customization setter methods for Jetty, Reactor Netty, Tomcat, and Undertow respectively.
295295
The following example shows how to customize `NettyReactiveWebServerFactory` that provides access to Reactor Netty-specific configuration options:
296296

297297
include::code:MyNettyWebServerFactoryCustomizer[]

spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/servlet.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ Usually, you would define the properties in your `application.properties` or `ap
575575

576576
Common server settings include:
577577

578-
* Network settings: Listen port for incoming HTTP requests (`server.port`), interface address to bind to `server.address`, and so on.
578+
* Network settings: Listen port for incoming HTTP requests (`server.port`), interface address to bind to (`server.address`), and so on.
579579
* Session settings: Whether the session is persistent (`server.servlet.session.persistent`), session timeout (`server.servlet.session.timeout`), location of session data (`server.servlet.session.store-dir`), and session-cookie configuration (`server.servlet.session.cookie.*`).
580580
* Error management: Location of the error page (`server.error.path`) and so on.
581581
* <<howto#howto.webserver.configure-ssl,SSL>>

spring-boot-project/spring-boot-parent/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ bom {
3030
library("C3P0", "0.9.5.5") {
3131
group("com.mchange") {
3232
modules = [
33-
"c3p0"
33+
"c3p0"
3434
]
3535
}
3636
}
@@ -141,7 +141,7 @@ bom {
141141
library("Micrometer Context Propagation", "1.0.5") {
142142
group("io.micrometer") {
143143
modules = [
144-
"context-propagation"
144+
"context-propagation"
145145
]
146146
}
147147
}

spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/web/servlet/SpringBootMockMvcBuilderCustomizerTests.java

-5
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,4 @@ public void destroy() {
210210

211211
}
212212

213-
static record RegisteredFilter(Filter filter, Map<String, String> initParameters,
214-
EnumSet<DispatcherType> dispatcherTypes) {
215-
216-
}
217-
218213
}

spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/zip/ZipContent.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
* contains. Unlike {@link java.util.zip.ZipFile}, this implementation can load content
4141
* from a zip file nested inside another file as long as the entry is not compressed.
4242
* <p>
43-
* In order to reduce memory consumption, this implementation stores only the the hash of
44-
* the entry names, the central directory offsets and the original positions. Entries are
43+
* In order to reduce memory consumption, this implementation stores only the hash of the
44+
* entry names, the central directory offsets and the original positions. Entries are
4545
* stored internally in {@code hashCode} order so that a binary search can be used to
4646
* quickly find an entry by name or determine if the zip file doesn't have a given entry.
4747
* <p>

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -1300,7 +1300,8 @@ public boolean isKeepAlive() {
13001300
}
13011301

13021302
/**
1303-
* Whether to keep the application alive even if there are no more non-daemon threads.
1303+
* Set whether to keep the application alive even if there are no more non-daemon
1304+
* threads.
13041305
* @param keepAlive whether to keep the application alive even if there are no more
13051306
* non-daemon threads
13061307
* @since 3.2.0

0 commit comments

Comments
 (0)