Skip to content

Commit fa70bcd

Browse files
brick0123fmbenhassine
authored andcommitted
Add final to RunIdIncrementer and Job/Step BuilderFactory fields
Issue #4143
1 parent ed4a318 commit fa70bcd

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

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

Lines changed: 3 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-2023 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.
@@ -25,14 +25,15 @@
2525
*
2626
* @author Dave Syer
2727
* @author Mahmoud Ben Hassine
28+
* @author Jinho Han
2829
* @deprecated Deprecated as of v5.0 and scheduled for removal in v5.2 in favor of using
2930
* the {@link JobBuilder}.
3031
*
3132
*/
3233
@Deprecated(since = "5.0.0", forRemoval = true)
3334
public class JobBuilderFactory {
3435

35-
private JobRepository jobRepository;
36+
private final JobRepository jobRepository;
3637

3738
/**
3839
* @param jobRepository The {@link JobRepository} to be used by the builder factory.

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

Lines changed: 3 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-2023 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.
@@ -26,14 +26,15 @@
2626
*
2727
* @author Dave Syer
2828
* @author Mahmoud Ben Hassine
29+
* @author Jinho Han
2930
* @deprecated Deprecated as of v5.0 and scheduled for removal in v5.2 in favor of using
3031
* the {@link StepBuilder}.
3132
*
3233
*/
3334
@Deprecated(since = "5.0.0", forRemoval = true)
3435
public class StepBuilderFactory {
3536

36-
private JobRepository jobRepository;
37+
private final JobRepository jobRepository;
3738

3839
/**
3940
* Constructor for the {@link StepBuilderFactory}.

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2020 the original author or authors.
2+
* Copyright 2006-2023 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.
@@ -28,10 +28,11 @@
2828
*
2929
* @author Dave Syer
3030
* @author Mahmoud Ben Hassine
31+
* @author Jinho Han
3132
*/
3233
public class RunIdIncrementer implements JobParametersIncrementer {
3334

34-
private static String RUN_ID_KEY = "run.id";
35+
private static final String RUN_ID_KEY = "run.id";
3536

3637
private String key = RUN_ID_KEY;
3738

0 commit comments

Comments
 (0)