Skip to content

Commit 1ccf7de

Browse files
committed
Polish
Signed-off-by: Johnny Lim <[email protected]>
1 parent af29ff5 commit 1ccf7de

File tree

19 files changed

+36
-36
lines changed

19 files changed

+36
-36
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1926,7 +1926,7 @@
19261926
},
19271927
{
19281928
"name": "management.metrics.graphql.autotime.enabled",
1929-
"description": "Whether to automatically time web client requests.",
1929+
"description": "Whether to automatically time GraphQL requests.",
19301930
"defaultValue": true,
19311931
"deprecation": {
19321932
"level": "error",

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/OnPropertyCondition.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,12 @@ private String getPrefix(AnnotationAttributes annotationAttributes) {
117117
private String[] getNames(AnnotationAttributes annotationAttributes) {
118118
String[] value = (String[]) annotationAttributes.get("value");
119119
String[] name = (String[]) annotationAttributes.get("name");
120-
Assert.state(value.length > 0 || name.length > 0, "The name or value attribute of @%s must be specified"
121-
.formatted(ClassUtils.getShortName(this.annotationType)));
122-
Assert.state(value.length == 0 || name.length == 0, "The name and value attributes of @%s are exclusive"
123-
.formatted(ClassUtils.getShortName(this.annotationType)));
120+
Assert.state(value.length > 0 || name.length > 0,
121+
() -> "The name or value attribute of @%s must be specified"
122+
.formatted(ClassUtils.getShortName(this.annotationType)));
123+
Assert.state(value.length == 0 || name.length == 0,
124+
() -> "The name and value attributes of @%s are exclusive"
125+
.formatted(ClassUtils.getShortName(this.annotationType)));
124126
return (value.length > 0) ? value : name;
125127
}
126128

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2492,17 +2492,17 @@ bom {
24922492
]
24932493
}
24942494
}
2495-
library("WebJars Locator Lite", "1.0.1") {
2495+
library("WebJars Locator Core", "0.59") {
24962496
group("org.webjars") {
24972497
modules = [
2498-
"webjars-locator-lite"
2498+
"webjars-locator-core"
24992499
]
25002500
}
25012501
}
2502-
library("WebJars Locator Core", "0.59") {
2502+
library("WebJars Locator Lite", "1.0.1") {
25032503
group("org.webjars") {
25042504
modules = [
2505-
"webjars-locator-core"
2505+
"webjars-locator-lite"
25062506
]
25072507
}
25082508
}

spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresJdbcDockerComposeConnectionDetailsFactoryIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,15 +84,15 @@ private void checkDatabaseAccess(JdbcConnectionDetails connectionDetails) throws
8484
}
8585

8686
@SuppressWarnings("unchecked")
87-
private <T> T executeQuery(JdbcConnectionDetails connectionDetails, String sql, Class<T> result)
87+
private <T> T executeQuery(JdbcConnectionDetails connectionDetails, String sql, Class<T> resultClass)
8888
throws ClassNotFoundException {
8989
SimpleDriverDataSource dataSource = new SimpleDriverDataSource();
9090
dataSource.setUrl(connectionDetails.getJdbcUrl());
9191
dataSource.setUsername(connectionDetails.getUsername());
9292
dataSource.setPassword(connectionDetails.getPassword());
9393
dataSource.setDriverClass((Class<? extends Driver>) ClassUtils.forName(connectionDetails.getDriverClassName(),
9494
getClass().getClassLoader()));
95-
return new JdbcTemplate(dataSource).queryForObject(sql, result);
95+
return new JdbcTemplate(dataSource).queryForObject(sql, resultClass);
9696
}
9797

9898
}

spring-boot-project/spring-boot-docker-compose/src/dockerTest/java/org/springframework/boot/docker/compose/service/connection/postgres/PostgresR2dbcDockerComposeConnectionDetailsFactoryIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ private void checkDatabaseAccess(R2dbcConnectionDetails connectionDetails) {
8888
.isEqualTo(1);
8989
}
9090

91-
private <T> T executeQuery(R2dbcConnectionDetails connectionDetails, String sql, Class<T> result) {
91+
private <T> T executeQuery(R2dbcConnectionDetails connectionDetails, String sql, Class<T> resultClass) {
9292
ConnectionFactoryOptions connectionFactoryOptions = connectionDetails.getConnectionFactoryOptions();
9393
return DatabaseClient.create(ConnectionFactories.get(connectionFactoryOptions))
9494
.sql(sql)
95-
.mapValue(result)
95+
.mapValue(resultClass)
9696
.first()
9797
.block(Duration.ofSeconds(30));
9898
}

spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/core/DockerCliCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ enum Type {
276276
*/
277277
record ComposeVersion(int major, int minor) {
278278

279-
public static final ComposeVersion UNKNOWN = new ComposeVersion(0, 0);
279+
static final ComposeVersion UNKNOWN = new ComposeVersion(0, 0);
280280

281281
boolean isLessThan(int major, int minor) {
282282
return major() < major || major() == major && minor() < minor;

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/features/dev-services.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ NOTE: Using a javadoc:org.springframework.boot.testcontainers.service.connection
377377

378378

379379
[[features.dev-services.testcontainers.at-development-time.importing-container-declarations]]
380-
==== Importing Testcontainer Declaration Classes
380+
==== Importing Testcontainers Declaration Classes
381381

382382
A common pattern when using Testcontainers is to declare javadoc:org.testcontainers.containers.Container[] instances as static fields.
383383
Often these fields are defined directly on the test class.
@@ -402,7 +402,7 @@ You can also add javadoc:org.springframework.test.context.DynamicPropertySource[
402402

403403
When using devtools, you can annotate beans and bean methods with javadoc:org.springframework.boot.devtools.restart.RestartScope[format=annotation].
404404
Such beans won't be recreated when the devtools restart the application.
405-
This is especially useful for Testcontainer javadoc:org.testcontainers.containers.Container[] beans, as they keep their state despite the application restart.
405+
This is especially useful for Testcontainers javadoc:org.testcontainers.containers.Container[] beans, as they keep their state despite the application restart.
406406

407407
include-code::MyContainersConfiguration[]
408408

spring-boot-project/spring-boot-test-autoconfigure/src/main/java/org/springframework/boot/test/autoconfigure/jdbc/AutoConfigureTestDatabase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ enum Replace {
7777
* databases:
7878
* <ul>
7979
* <li>Any bean definition that includes {@link ContainerImageMetadata} (including
80-
* {@code @ServiceConnection} annotated Testcontainer databases, and connections
80+
* {@code @ServiceConnection} annotated Testcontainers databases, and connections
8181
* created using Docker Compose)</li>
8282
* <li>Any connection configured using a {@code spring.datasource.url} backed by a
8383
* {@link DynamicPropertySource @DynamicPropertySource}</li>

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ void jdkBuilderCanBeSpecifiedWithSpecificRedirects() {
155155
}
156156

157157
@Test
158-
void httpComponentsAreBuildConsideringSettingsInRestTemplateBuilder() {
158+
void httpComponentsAreBuiltConsideringSettingsInRestTemplateBuilder() {
159159
RestTemplateBuilder builder = new RestTemplateBuilder()
160160
.requestFactoryBuilder(ClientHttpRequestFactoryBuilder.httpComponents());
161161
assertThat(getRequestConfig((RestTemplateBuilder) null).isRedirectsEnabled()).isFalse();
@@ -209,9 +209,8 @@ private RequestConfig getRequestConfig(TestRestTemplate template) {
209209
return factory.createRequestConfig();
210210
}
211211

212-
private HttpClient getJdkHttpClient(TestRestTemplate templateWithRedirects) {
213-
JdkClientHttpRequestFactory requestFactory = (JdkClientHttpRequestFactory) templateWithRedirects
214-
.getRestTemplate()
212+
private HttpClient getJdkHttpClient(TestRestTemplate template) {
213+
JdkClientHttpRequestFactory requestFactory = (JdkClientHttpRequestFactory) template.getRestTemplate()
215214
.getRequestFactory();
216215
return (HttpClient) ReflectionTestUtils.getField(requestFactory, "httpClient");
217216
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
*/
4040
@SpringJUnitConfig
4141
@Testcontainers(disabledWithoutDocker = true)
42-
class ServiceConnectionStartsConnectionOnceIntegrationTest {
42+
class ServiceConnectionStartsConnectionOnceIntegrationTests {
4343

4444
@Container
4545
@ServiceConnection

spring-boot-project/spring-boot-testcontainers/src/main/java/org/springframework/boot/testcontainers/context/ImportTestcontainers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import org.springframework.context.annotation.Import;
3131

3232
/**
33-
* Imports idiomatic Testcontainer declaration classes into the Spring
33+
* Imports idiomatic Testcontainers declaration classes into the Spring
3434
* {@link ApplicationContext}. The following elements will be considered from the imported
3535
* classes:
3636
* <ul>

spring-boot-project/spring-boot-tools/spring-boot-buildpack-platform/src/test/java/org/springframework/boot/buildpack/platform/docker/ProgressUpdateEventTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ void getStatusReturnsStatus() {
3939
}
4040

4141
@Test
42-
void getProgressDetailsReturnsProgressDetails() {
42+
void getProgressDetailReturnsProgressDetails() {
4343
ProgressUpdateEvent event = createEvent();
4444
assertThat(event.getProgressDetail().asPercentage()).isEqualTo(50);
4545
}
4646

4747
@Test
48-
void getProgressDetailsReturnsProgressDetailsForLongNumbers() {
48+
void getProgressDetailReturnsProgressDetailsForLongNumbers() {
4949
ProgressUpdateEvent event = createEvent("status", new ProgressDetail(4000000000L, 8000000000L), "progress");
5050
assertThat(event.getProgressDetail().asPercentage()).isEqualTo(50);
5151
}

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/DataSourceBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
* <li>Apache DBCP2 ({@code org.apache.commons.dbcp2.BasicDataSource})</li>
6262
* <li>Oracle UCP ({@code oracle.ucp.jdbc.PoolDataSourceImpl})</li>
6363
* <li>C3P0 ({@code com.mchange.v2.c3p0.ComboPooledDataSource})</li>
64-
* <li>Vibur {@code org.vibur.dbcp.ViburDBCPDataSource}</li>
64+
* <li>Vibur ({@code org.vibur.dbcp.ViburDBCPDataSource})</li>
6565
* </ul>
6666
* <p>
6767
* The following non-pooling {@link DataSource} implementations can be used when

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jms/ConnectionFactoryUnwrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ private ConnectionFactoryUnwrapper() {
3434
}
3535

3636
/**
37-
* Return the native {@link ConnectionFactory} by unwrapping ot from a
37+
* Return the native {@link ConnectionFactory} by unwrapping from a
3838
* {@link CachingConnectionFactory}. Return the given {@link ConnectionFactory} if no
3939
* {@link CachingConnectionFactory} wrapper has been detected.
4040
* @param connectionFactory a connection factory

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/LoggingSystemProperty.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ public String getEnvironmentVariableName() {
142142
}
143143

144144
/**
145-
* Return the name of the application property name that can be used to set this
146-
* property.
145+
* Return the application property name that can be used to set this property.
147146
* @return the application property name
148147
* @since 3.4.0
149148
*/

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/log4j2/Log4J2LoggingSystem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,8 @@ public void initialize(LoggingInitializationContext initializationContext, Strin
228228

229229
/**
230230
* Reset the stream used by the fallback listener to the current system out. This
231-
* allows the fallback lister to work with any captured output streams in a similar
232-
* way to the {@code follow} attribute of the {@code literal Console} appender.
231+
* allows the fallback listener to work with any captured output streams in a similar
232+
* way to the {@code follow} attribute of the {@code Console} appender.
233233
* @param statusLogger the status logger to update
234234
*/
235235
private void resetFallbackListenerStream(StatusLogger statusLogger) {

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/DebugLogbackConfigurator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ <T extends Converter<?>> void conversionRule(String conversionWord, Class<T> con
4747
}
4848

4949
@Override
50-
public void appender(String name, Appender<?> appender) {
50+
void appender(String name, Appender<?> appender) {
5151
info("Adding appender '" + appender + "' named '" + name + "'");
5252
super.appender(name, appender);
5353
}
5454

5555
@Override
56-
public void logger(String name, Level level, boolean additive, Appender<ILoggingEvent> appender) {
56+
void logger(String name, Level level, boolean additive, Appender<ILoggingEvent> appender) {
5757
info("Configuring logger '" + name + "' with level '" + level + "'. Additive: " + additive);
5858
if (appender != null) {
5959
info("Adding appender '" + appender + "' to logger '" + name + "'");
@@ -62,7 +62,7 @@ public void logger(String name, Level level, boolean additive, Appender<ILogging
6262
}
6363

6464
@Override
65-
public void start(LifeCycle lifeCycle) {
65+
void start(LifeCycle lifeCycle) {
6666
info("Starting '" + lifeCycle + "'");
6767
super.start(lifeCycle);
6868
}

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/logging/logback/FilteringStatusListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class FilteringStatusListener extends ContextAwareBase implements StatusListener
3535

3636
/**
3737
* Creates a new {@link FilteringStatusListener}.
38-
* @param delegate the {@link StatusListener} delegate to
38+
* @param delegate the {@link StatusListener} to delegate
3939
* @param levelThreshold the minimum log level accepted for delegation
4040
*/
4141
FilteringStatusListener(StatusListener delegate, int levelThreshold) {

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/logging/logback/FilteringStatusListenerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void shouldFilterOutInfoStatus() {
5252

5353
@Test
5454
void shouldStartUnderlyingStatusListener() {
55-
FilteringStatusListener listener = createListener(Status.INFO);
55+
FilteringStatusListener listener = createListener();
5656
assertThat(this.delegate.isStarted()).isFalse();
5757
listener.start();
5858
assertThat(this.delegate.isStarted()).isTrue();

0 commit comments

Comments
 (0)