Skip to content

Commit 4216a0a

Browse files
committed
Fix incorrect deprecation warnings in JobOperatorTestUtils
Resolves #5123
1 parent 5750492 commit 4216a0a

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

spring-batch-test/src/main/java/org/springframework/batch/test/JobOperatorTestUtils.java

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2025 the original author or authors.
2+
* Copyright 2025-present 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.
@@ -100,6 +100,15 @@ public void setJob(Job job) {
100100
this.job = job;
101101
}
102102

103+
/**
104+
* Get the job that can be operated by this utility.
105+
* @return the job under test
106+
*/
107+
@Override
108+
public Job getJob() {
109+
return super.getJob();
110+
}
111+
103112
/**
104113
* Set the job operator to be used by this utility.
105114
* @param jobOperator the job operator to use to start jobs and steps
@@ -108,6 +117,14 @@ public void setJobOperator(JobOperator jobOperator) {
108117
this.jobOperator = jobOperator;
109118
}
110119

120+
/**
121+
* Get the job operator used by this utility.
122+
* @return the job operator
123+
*/
124+
public JobOperator getJobOperator() {
125+
return this.jobOperator;
126+
}
127+
111128
/**
112129
* Set the job repository to be used by this utility.
113130
* @param jobRepository the job repository to use to access job metadata
@@ -116,6 +133,15 @@ public void setJobRepository(JobRepository jobRepository) {
116133
this.jobRepository = jobRepository;
117134
}
118135

136+
/**
137+
* Get the job repository used by this utility.
138+
* @return the job repository
139+
*/
140+
@Override
141+
public JobRepository getJobRepository() {
142+
return super.getJobRepository();
143+
}
144+
119145
/**
120146
* Start the entire job, including all steps, with a set of unique random job
121147
* parameters.

0 commit comments

Comments
 (0)