Add final to RunIdIncrementer and Job/Step BuilderFactory fields

Issue #4143
This commit is contained in:
Jinho Han
2022-07-01 00:01:19 +09:00
committed by Mahmoud Ben Hassine
parent ed4a318d26
commit fa70bcd775
3 changed files with 9 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@ import org.springframework.util.Assert;
*
* @author Dave Syer
* @author Mahmoud Ben Hassine
* @author Jinho Han
* @deprecated Deprecated as of v5.0 and scheduled for removal in v5.2 in favor of using
* the {@link JobBuilder}.
*
@@ -32,7 +33,7 @@ import org.springframework.util.Assert;
@Deprecated(since = "5.0.0", forRemoval = true)
public class JobBuilderFactory {
private JobRepository jobRepository;
private final JobRepository jobRepository;
/**
* @param jobRepository The {@link JobRepository} to be used by the builder factory.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -26,6 +26,7 @@ import org.springframework.util.Assert;
*
* @author Dave Syer
* @author Mahmoud Ben Hassine
* @author Jinho Han
* @deprecated Deprecated as of v5.0 and scheduled for removal in v5.2 in favor of using
* the {@link StepBuilder}.
*
@@ -33,7 +34,7 @@ import org.springframework.util.Assert;
@Deprecated(since = "5.0.0", forRemoval = true)
public class StepBuilderFactory {
private JobRepository jobRepository;
private final JobRepository jobRepository;
/**
* Constructor for the {@link StepBuilderFactory}.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2006-2020 the original author or authors.
* Copyright 2006-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,10 +28,11 @@ import org.springframework.lang.Nullable;
*
* @author Dave Syer
* @author Mahmoud Ben Hassine
* @author Jinho Han
*/
public class RunIdIncrementer implements JobParametersIncrementer {
private static String RUN_ID_KEY = "run.id";
private static final String RUN_ID_KEY = "run.id";
private String key = RUN_ID_KEY;