Skip to content

Commit c891775

Browse files
committed
Merge pull request #43498 from izeye
* pr/43498: Polish Closes gh-43498
2 parents e62bda9 + 4d15ee5 commit c891775

File tree

12 files changed

+52
-50
lines changed

12 files changed

+52
-50
lines changed

CONTRIBUTING.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ None of these is essential for a pull request, but they will all help. They can
4343
added after the original pull request but before a merge.
4444

4545
* We use the https://github.com/spring-io/spring-javaformat/[Spring JavaFormat] project to apply code formatting conventions.
46-
If you use Eclipse and you follow the https://github.com/spring-projects/spring-boot/wiki/Working-with-the-Code#importing-into-eclipse["Importing into eclipse"] instructions you should get project specific formatting automatically.
46+
If you use Eclipse and you follow the https://github.com/spring-projects/spring-boot/wiki/Working-with-the-Code#importing-into-eclipse["Importing into Eclipse"] instructions you should get project-specific formatting automatically.
4747
You can also install the https://github.com/spring-io/spring-javaformat/#intellij-idea[Spring JavaFormat IntelliJ Plugin] or format the code from the Gradle build by running `./gradlew format`.
4848
Note that if you have format violations in `buildSrc`, you can fix them by running `./gradlew -p buildSrc format` from the project root directory.
4949
* The build includes Checkstyle rules for many of our code conventions. Run `./gradlew checkstyleMain checkstyleTest` if you want to check your changes are compliant.

buildSrc/src/main/java/org/springframework/boot/build/bom/CheckBom.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ private File resolveBom(Library library, String alignsWithBom) {
216216
.getResolvedConfiguration()
217217
.getResolvedArtifacts();
218218
if (artifacts.size() != 1) {
219-
throw new IllegalStateException("Expected a single file but '%s' resolved to %d artifacts"
219+
throw new IllegalStateException("Expected a single artifact but '%s' resolved to %d artifacts"
220220
.formatted(coordinates, artifacts.size()));
221221
}
222222
return artifacts.iterator().next().getFile();

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/logging/OnEnabledLoggingExportCondition.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,13 @@ class OnEnabledLoggingExportCondition extends SpringBootCondition {
4242
public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeMetadata metadata) {
4343
String loggingExporter = getExporterName(metadata);
4444
if (StringUtils.hasLength(loggingExporter)) {
45+
String formattedExporterProperty = EXPORTER_PROPERTY.formatted(loggingExporter);
4546
Boolean exporterLoggingEnabled = context.getEnvironment()
46-
.getProperty(EXPORTER_PROPERTY.formatted(loggingExporter), Boolean.class);
47+
.getProperty(formattedExporterProperty, Boolean.class);
4748
if (exporterLoggingEnabled != null) {
4849
return new ConditionOutcome(exporterLoggingEnabled,
4950
ConditionMessage.forCondition(ConditionalOnEnabledLoggingExport.class)
50-
.because(EXPORTER_PROPERTY.formatted(loggingExporter) + " is " + exporterLoggingEnabled));
51+
.because(formattedExporterProperty + " is " + exporterLoggingEnabled));
5152
}
5253
}
5354
Boolean globalLoggingEnabled = context.getEnvironment().getProperty(GLOBAL_PROPERTY, Boolean.class);

spring-boot-project/spring-boot-autoconfigure/src/test/resources/batch/custom-schema.sql

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,58 @@
11
CREATE TABLE PREFIX_JOB_INSTANCE (
2-
JOB_INSTANCE_ID BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY ,
3-
VERSION BIGINT ,
2+
JOB_INSTANCE_ID BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
3+
VERSION BIGINT,
44
JOB_NAME VARCHAR(100) NOT NULL,
55
JOB_KEY VARCHAR(32) NOT NULL,
66
constraint JOB_INST_UN unique (JOB_NAME, JOB_KEY)
77
) ;
88

99
CREATE TABLE PREFIX_JOB_EXECUTION (
10-
JOB_EXECUTION_ID BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY ,
11-
VERSION BIGINT ,
10+
JOB_EXECUTION_ID BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
11+
VERSION BIGINT,
1212
JOB_INSTANCE_ID BIGINT NOT NULL,
1313
CREATE_TIME TIMESTAMP NOT NULL,
14-
START_TIME TIMESTAMP DEFAULT NULL ,
15-
END_TIME TIMESTAMP DEFAULT NULL ,
16-
STATUS VARCHAR(10) ,
17-
EXIT_CODE VARCHAR(2500) ,
18-
EXIT_MESSAGE VARCHAR(2500) ,
14+
START_TIME TIMESTAMP DEFAULT NULL,
15+
END_TIME TIMESTAMP DEFAULT NULL,
16+
STATUS VARCHAR(10),
17+
EXIT_CODE VARCHAR(2500),
18+
EXIT_MESSAGE VARCHAR(2500),
1919
LAST_UPDATED TIMESTAMP,
2020
JOB_CONFIGURATION_LOCATION VARCHAR(2500) NULL,
2121
constraint JOB_INST_EXEC_FK foreign key (JOB_INSTANCE_ID)
2222
references PREFIX_JOB_INSTANCE(JOB_INSTANCE_ID)
2323
) ;
2424

2525
CREATE TABLE PREFIX_JOB_EXECUTION_PARAMS (
26-
JOB_EXECUTION_ID BIGINT NOT NULL ,
27-
TYPE_CD VARCHAR(6) NOT NULL ,
28-
KEY_NAME VARCHAR(100) NOT NULL ,
29-
STRING_VAL VARCHAR(250) ,
30-
DATE_VAL TIMESTAMP DEFAULT NULL ,
31-
LONG_VAL BIGINT ,
32-
DOUBLE_VAL DOUBLE PRECISION ,
33-
IDENTIFYING CHAR(1) NOT NULL ,
26+
JOB_EXECUTION_ID BIGINT NOT NULL,
27+
TYPE_CD VARCHAR(6) NOT NULL,
28+
KEY_NAME VARCHAR(100) NOT NULL,
29+
STRING_VAL VARCHAR(250),
30+
DATE_VAL TIMESTAMP DEFAULT NULL,
31+
LONG_VAL BIGINT,
32+
DOUBLE_VAL DOUBLE PRECISION,
33+
IDENTIFYING CHAR(1) NOT NULL,
3434
constraint JOB_EXEC_PARAMS_FK foreign key (JOB_EXECUTION_ID)
3535
references PREFIX_JOB_EXECUTION(JOB_EXECUTION_ID)
3636
) ;
3737

3838
CREATE TABLE PREFIX_STEP_EXECUTION (
39-
STEP_EXECUTION_ID BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY ,
39+
STEP_EXECUTION_ID BIGINT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
4040
VERSION BIGINT NOT NULL,
4141
STEP_NAME VARCHAR(100) NOT NULL,
4242
JOB_EXECUTION_ID BIGINT NOT NULL,
43-
START_TIME TIMESTAMP NOT NULL ,
44-
END_TIME TIMESTAMP DEFAULT NULL ,
45-
STATUS VARCHAR(10) ,
46-
COMMIT_COUNT BIGINT ,
47-
READ_COUNT BIGINT ,
48-
FILTER_COUNT BIGINT ,
49-
WRITE_COUNT BIGINT ,
50-
READ_SKIP_COUNT BIGINT ,
51-
WRITE_SKIP_COUNT BIGINT ,
52-
PROCESS_SKIP_COUNT BIGINT ,
53-
ROLLBACK_COUNT BIGINT ,
54-
EXIT_CODE VARCHAR(2500) ,
55-
EXIT_MESSAGE VARCHAR(2500) ,
43+
START_TIME TIMESTAMP NOT NULL,
44+
END_TIME TIMESTAMP DEFAULT NULL,
45+
STATUS VARCHAR(10),
46+
COMMIT_COUNT BIGINT,
47+
READ_COUNT BIGINT,
48+
FILTER_COUNT BIGINT,
49+
WRITE_COUNT BIGINT,
50+
READ_SKIP_COUNT BIGINT,
51+
WRITE_SKIP_COUNT BIGINT,
52+
PROCESS_SKIP_COUNT BIGINT,
53+
ROLLBACK_COUNT BIGINT,
54+
EXIT_CODE VARCHAR(2500),
55+
EXIT_MESSAGE VARCHAR(2500),
5656
LAST_UPDATED TIMESTAMP,
5757
constraint JOB_EXEC_STEP_FK foreign key (JOB_EXECUTION_ID)
5858
references PREFIX_JOB_EXECUTION(JOB_EXECUTION_ID)
@@ -61,15 +61,15 @@ CREATE TABLE PREFIX_STEP_EXECUTION (
6161
CREATE TABLE PREFIX_STEP_EXECUTION_CONTEXT (
6262
STEP_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY,
6363
SHORT_CONTEXT VARCHAR(2500) NOT NULL,
64-
SERIALIZED_CONTEXT LONGVARCHAR ,
64+
SERIALIZED_CONTEXT LONGVARCHAR,
6565
constraint STEP_EXEC_CTX_FK foreign key (STEP_EXECUTION_ID)
6666
references PREFIX_STEP_EXECUTION(STEP_EXECUTION_ID)
6767
) ;
6868

6969
CREATE TABLE PREFIX_JOB_EXECUTION_CONTEXT (
7070
JOB_EXECUTION_ID BIGINT NOT NULL PRIMARY KEY,
7171
SHORT_CONTEXT VARCHAR(2500) NOT NULL,
72-
SERIALIZED_CONTEXT LONGVARCHAR ,
72+
SERIALIZED_CONTEXT LONGVARCHAR,
7373
constraint JOB_EXEC_CTX_FK foreign key (JOB_EXECUTION_ID)
7474
references PREFIX_JOB_EXECUTION(JOB_EXECUTION_ID)
7575
) ;

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/io/rest-client.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,8 @@ If multiple clients are available on the classpath, and not global configuration
209209
[[io.rest-client.clienthttprequestfactory.configuration]]
210210
=== Global HTTP Client Configuration
211211

212-
If the the auto-detected HTTP client does not meet your needs, you can use the configprop:spring.http.client.factory[] property to pick a specific factory.
213-
For example, if you have Apache HttpClient on your classpath, but you prefer Jetty's javadoc:org.eclipse.jetty.client.HttpClient[] you can add use the following:
212+
If the auto-detected HTTP client does not meet your needs, you can use the configprop:spring.http.client.factory[] property to pick a specific factory.
213+
For example, if you have Apache HttpClient on your classpath, but you prefer Jetty's javadoc:org.eclipse.jetty.client.HttpClient[] you can add the following:
214214

215215
[configprops,yaml]
216216
----

spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/io/restclient/clienthttprequestfactory/configuration/MyClientHttpConfiguration.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import java.net.http.HttpClient
1010
class MyClientHttpConfiguration {
1111

1212
@Bean
13-
fun clientHttpRequestFactoryBuilder(proxySelector: ProxySelector): ClientHttpRequestFactoryBuilder<*>? {
13+
fun clientHttpRequestFactoryBuilder(proxySelector: ProxySelector): ClientHttpRequestFactoryBuilder<*> {
1414
return ClientHttpRequestFactoryBuilder.jdk()
1515
.withHttpClientCustomizer { builder -> builder.proxy(proxySelector) }
1616
}

spring-boot-project/spring-boot-test-autoconfigure/src/test/java/org/springframework/boot/test/autoconfigure/json/app/ExampleJsonComponent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static class Deserializer extends JsonObjectDeserializer<ExampleCustomObject> {
5959
protected ExampleCustomObject deserializeObject(JsonParser jsonParser, DeserializationContext context,
6060
ObjectCodec codec, JsonNode tree) throws IOException {
6161
String value = nullSafeValue(tree.get("value"), String.class);
62-
Date date = nullSafeValue(tree.get("date"), Integer.class, Date::new);
62+
Date date = nullSafeValue(tree.get("date"), Long.class, Date::new);
6363
UUID uuid = nullSafeValue(tree.get("uuid"), String.class, UUID::fromString);
6464
return new ExampleCustomObject(value, date, uuid);
6565
}

spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/json-shade/java/org/springframework/boot/configurationprocessor/json/JSONObject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ public static String quote(String data) {
786786
/**
787787
* Wraps the given object if necessary.
788788
* <p>
789-
* If the object is null or , returns {@link #NULL}. If the object is a
789+
* If the object is null or, returns {@link #NULL}. If the object is a
790790
* {@code JSONArray} or {@code JSONObject}, no wrapping is necessary. If the object is
791791
* {@code NULL}, no wrapping is necessary. If the object is an array or
792792
* {@code Collection}, returns an equivalent {@code JSONArray}. If the object is a

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/util/Instantiator.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ public T instantiate(ClassLoader classLoader, String name) {
149149
}
150150

151151
/**
152-
* Instantiate the given set of classes, injecting constructor arguments as necessary.
153-
* @param type the types to instantiate
154-
* @return a list of instantiated instances
152+
* Instantiate the given class, injecting constructor arguments as necessary.
153+
* @param type the type to instantiate
154+
* @return an instantiated instance
155155
* @since 3.4.0
156156
*/
157157
public T instantiateType(Class<?> type) {

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/client/RestTemplateBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ this.errorHandler, this.basicAuthentication, append(this.defaultHeaders, name, v
438438

439439
/**
440440
* Sets the {@link ClientHttpRequestFactorySettings}. This will replace any previously
441-
* set {@link #connectTimeout(Duration) connectTimeout} ,{@link #readTimeout(Duration)
441+
* set {@link #connectTimeout(Duration) connectTimeout}, {@link #readTimeout(Duration)
442442
* readTimeout} and {@link #sslBundle(SslBundle) sslBundle} values.
443443
* @param requestFactorySettings the request factory settings
444444
* @return a new builder instance

0 commit comments

Comments
 (0)