Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e2dcee1

Browse files
avoid warning when job parameters are empty with incrementer
Closes: gh-4914 Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
1 parent ff90464 commit e2dcee1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobOperator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
* @author Lucas Ward
8181
* @author Will Schipp
8282
* @author Mahmoud Ben Hassine
83+
* @author Andrey Litvitski
8384
* @since 2.0
8485
* @deprecated since 6.0 in favor of {@link TaskExecutorJobOperator}. Scheduled for
8586
* removal in 6.2 or later.
@@ -187,7 +188,7 @@ public JobExecution start(Job job, JobParameters jobParameters)
187188
JobRestartException, JobParametersInvalidException {
188189
Assert.notNull(job, "The Job must not be null.");
189190
Assert.notNull(jobParameters, "The JobParameters must not be null.");
190-
if (job.getJobParametersIncrementer() != null) {
191+
if (job.getJobParametersIncrementer() != null && !jobParameters.isEmpty()) {
191192
if (logger.isWarnEnabled()) {
192193
logger.warn(String.format(
193194
"Attempting to launch job '%s' which defines an incrementer with additional parameters={%s}. Those additional parameters will be ignored.",

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /