Skip to content

Commit 2be4de9

Browse files
authored
Merge branch 'main' into GH-4826
Signed-off-by: Harry <43809168+minkukjo@users.noreply.github.com>
2 parents b200b1e + e35c87c commit 2be4de9

File tree

455 files changed

+3777
-3107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

455 files changed

+3777
-3107
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
Thank you for taking time to contribute this pull request!
22
You might have already read the [contributor guide][1], but as a reminder, please make sure to:
33

4-
* Sign the [contributor license agreement](https://cla.pivotal.io/sign/spring)
54
* Rebase your changes on the latest `main` branch and squash your commits
65
* Add/Update unit tests as needed
76
* Run a build and make sure all tests pass prior to submission
7+
* Sign-off commits according to the [Developer Certificate of Origin](https://spring.io/blog/2025/01/06/hello-dco-goodbye-cla-simplifying-contributions-to-spring)
88

99
For more details, please check the [contributor guide][1].
1010
Thank you upfront!

.mvn/jvm.config

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
2+
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
3+
--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
4+
--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
5+
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
6+
--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
7+
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
8+
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
9+
--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
10+
--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED

pom.xml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@
155155
<maven-assembly-plugin.version>3.7.1</maven-assembly-plugin.version>
156156
<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
157157
<spring-javaformat-maven-plugin.version>0.0.39</spring-javaformat-maven-plugin.version>
158+
<error-prone.version>2.38.0</error-prone.version>
158159
</properties>
159160

160161
<build>
@@ -181,7 +182,59 @@
181182
<release>${java.version}</release>
182183
<compilerArgs>
183184
<compilerArg>-parameters</compilerArg>
185+
<!-- https://errorprone.info/docs/installation#maven -->
186+
<compilerArg>-XDcompilePolicy=simple</compilerArg>
187+
<compilerArg>--should-stop=ifError=FLOW</compilerArg>
188+
<compilerArg>
189+
-Xplugin:ErrorProne
190+
-Xep:AlmostJavadoc:OFF
191+
-Xep:ByteBufferBackingArray:OFF
192+
-Xep:ClassCanBeStatic:OFF
193+
-Xep:CollectionUndefinedEquality:OFF
194+
-Xep:DefaultCharset:OFF
195+
-Xep:DirectInvocationOnMock:OFF
196+
-Xep:DoNotCallSuggester:OFF
197+
-Xep:EmptyCatch:OFF
198+
-Xep:EqualsGetClass:OFF
199+
-Xep:Finally:OFF
200+
-Xep:FutureReturnValueIgnored:OFF
201+
-Xep:HidingField:OFF
202+
-Xep:ImmutableEnumChecker:OFF
203+
-Xep:InlineMeSuggester:OFF
204+
-Xep:InputStreamSlowMultibyteRead:OFF
205+
-Xep:JavaTimeDefaultTimeZone:OFF
206+
-Xep:JavaUtilDate:OFF
207+
-Xep:JdkObsolete:OFF
208+
-Xep:MissingSummary:OFF
209+
-Xep:MixedMutabilityReturnType:OFF
210+
-Xep:MutablePublicArray:OFF
211+
-Xep:NonAtomicVolatileUpdate:OFF
212+
-Xep:RedundantControlFlow:OFF
213+
-Xep:ReferenceEquality:OFF
214+
-Xep:StaticAssignmentInConstructor:OFF
215+
-Xep:StaticAssignmentOfThrowable:OFF
216+
-Xep:StaticMockMember:OFF
217+
-Xep:StreamResourceLeak:OFF
218+
-Xep:StringCaseLocaleUsage:OFF
219+
-Xep:StringSplitter:OFF
220+
-Xep:SynchronizeOnNonFinalField:OFF
221+
-Xep:ThreadLocalUsage:OFF
222+
-Xep:ThreadPriorityCheck:OFF
223+
-Xep:TypeParameterUnusedInFormals:OFF
224+
-Xep:UndefinedEquals:OFF
225+
-Xep:UnnecessaryStringBuilder:OFF
226+
-Xep:UnusedMethod:OFF
227+
-Xep:UnusedVariable:OFF
228+
-Xep:WaitNotInLoop:OFF
229+
</compilerArg>
184230
</compilerArgs>
231+
<annotationProcessorPaths>
232+
<path>
233+
<groupId>com.google.errorprone</groupId>
234+
<artifactId>error_prone_core</artifactId>
235+
<version>${error-prone.version}</version>
236+
</path>
237+
</annotationProcessorPaths>
185238
</configuration>
186239
</plugin>
187240
<plugin>

spring-batch-core/src/main/java/org/springframework/batch/core/Entity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public boolean equals(Object other) {
146146
@Override
147147
public int hashCode() {
148148
if (id == null) {
149-
return super.hashCode();
149+
return System.identityHashCode(this);
150150
}
151151
return 39 + 87 * id.hashCode();
152152
}

spring-batch-core/src/main/java/org/springframework/batch/core/ExitStatus.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2023 the original author or authors.
2+
* Copyright 2006-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,6 +15,7 @@
1515
*/
1616
package org.springframework.batch.core;
1717

18+
import org.jspecify.annotations.Nullable;
1819
import org.springframework.util.StringUtils;
1920

2021
import java.io.PrintWriter;
@@ -28,6 +29,7 @@
2829
*
2930
* @author Dave Syer
3031
* @author Mahmoud Ben Hassine
32+
* @author JiWon Seo
3133
*
3234
*/
3335
public class ExitStatus implements Serializable, Comparable<ExitStatus> {
@@ -198,7 +200,7 @@ public String toString() {
198200
* @see java.lang.Object#equals(java.lang.Object)
199201
*/
200202
@Override
201-
public boolean equals(Object obj) {
203+
public boolean equals(@Nullable Object obj) {
202204
if (obj == null) {
203205
return false;
204206
}
@@ -230,7 +232,7 @@ public ExitStatus replaceExitCode(String code) {
230232
* @return {@code true} if the exit code is {@code EXECUTING} or {@code UNKNOWN}.
231233
*/
232234
public boolean isRunning() {
233-
return "EXECUTING".equals(this.exitCode) || "UNKNOWN".equals(this.exitCode);
235+
return EXECUTING.exitCode.equals(this.exitCode) || UNKNOWN.exitCode.equals(this.exitCode);
234236
}
235237

236238
/**

spring-batch-core/src/main/java/org/springframework/batch/core/JobExecution.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public void upgradeStatus(BatchStatus status) {
203203
/**
204204
* Convenience getter for the {@code id} of the enclosing job. Useful for DAO
205205
* implementations.
206-
* @return the @{code id} of the enclosing job.
206+
* @return the {@code id} of the enclosing job.
207207
*/
208208
public Long getJobId() {
209209
if (jobInstance != null) {

spring-batch-core/src/main/java/org/springframework/batch/core/JobParameters.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ public String toString() {
373373
for (Map.Entry<String, JobParameter<?>> entry : this.parameters.entrySet()) {
374374
parameters.add(String.format("'%s':'%s'", entry.getKey(), entry.getValue()));
375375
}
376-
return new StringBuilder("{").append(String.join(",", parameters)).append("}").toString();
376+
return "{" + String.join(",", parameters) + "}";
377377
}
378378

379379
}

spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ public boolean equals(Object obj) {
492492
return super.equals(obj);
493493
}
494494

495-
return stepName.equals(other.getStepName()) && (jobExecutionId.equals(other.getJobExecutionId()))
495+
return stepName.equals(other.getStepName()) && jobExecutionId.equals(other.getJobExecutionId())
496496
&& getId().equals(other.getId());
497497
}
498498

spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterChunk.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2008 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
1515
*/
1616
package org.springframework.batch.core.annotation;
1717

18-
import org.springframework.batch.core.ChunkListener;
18+
import org.springframework.batch.core.listener.ChunkListener;
1919
import org.springframework.batch.core.scope.context.ChunkContext;
2020

2121
import java.lang.annotation.ElementType;

spring-batch-core/src/main/java/org/springframework/batch/core/annotation/AfterChunkError.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2022 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
1515
*/
1616
package org.springframework.batch.core.annotation;
1717

18-
import org.springframework.batch.core.ChunkListener;
18+
import org.springframework.batch.core.listener.ChunkListener;
1919
import org.springframework.batch.core.scope.context.ChunkContext;
2020

2121
import java.lang.annotation.ElementType;

0 commit comments

Comments
 (0)