Skip to content

Commit 2306141

Browse files
committed
Polish a7092a2
1 parent a7092a2 commit 2306141

File tree

11 files changed

+9
-16
lines changed

11 files changed

+9
-16
lines changed

Diff for: spring-batch-core/src/main/java/org/springframework/batch/core/job/AbstractJob.java

-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ public String getName() {
165165
* @param stepName name of the step
166166
* @return the Step
167167
*/
168-
@Nullable
169168
@Override
170169
public abstract Step getStep(String stepName);
171170

Diff for: spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleJob.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
import org.springframework.batch.core.StepExecution;
3030
import org.springframework.batch.core.repository.JobRestartException;
3131
import org.springframework.batch.core.step.StepLocator;
32-
import org.springframework.lang.Nullable;
3332

3433
/**
3534
* Simple implementation of {@link Job} interface providing the ability to run a
@@ -40,6 +39,7 @@
4039
* @author Lucas Ward
4140
* @author Dave Syer
4241
* @author Michael Minella
42+
* @author Mahmoud Ben Hassine
4343
*/
4444
public class SimpleJob extends AbstractJob {
4545

@@ -103,7 +103,6 @@ public void addStep(Step step) {
103103
* @see
104104
* org.springframework.batch.core.job.AbstractJob#getStep(java.lang.String)
105105
*/
106-
@Nullable
107106
@Override
108107
public Step getStep(String stepName) {
109108
for (Step step : this.steps) {

Diff for: spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowJob.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import org.springframework.batch.core.job.SimpleStepHandler;
2828
import org.springframework.batch.core.step.StepHolder;
2929
import org.springframework.batch.core.step.StepLocator;
30-
import org.springframework.lang.Nullable;
3130

3231
/**
3332
* Implementation of the {@link Job} interface that allows for complex flows of
@@ -36,6 +35,7 @@
3635
* namespace to abstract away details.
3736
*
3837
* @author Dave Syer
38+
* @author Mahmoud Ben Hassine
3939
* @since 2.0
4040
*/
4141
public class FlowJob extends AbstractJob {
@@ -74,7 +74,6 @@ public void setFlow(Flow flow) {
7474
/**
7575
* {@inheritDoc}
7676
*/
77-
@Nullable
7877
@Override
7978
public Step getStep(String stepName) {
8079
if (!initialized) {

Diff for: spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/StepState.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
import org.springframework.batch.core.step.NoSuchStepException;
2828
import org.springframework.batch.core.step.StepHolder;
2929
import org.springframework.batch.core.step.StepLocator;
30-
import org.springframework.lang.Nullable;
3130

3231
/**
3332
* {@link State} implementation that delegates to a {@link FlowExecutor} to
3433
* execute the specified {@link Step}.
3534
*
3635
* @author Dave Syer
3736
* @author Michael Minella
37+
* @author Mahmoud Ben Hassine
3838
* @since 2.0
3939
*/
4040
public class StepState extends AbstractState implements StepLocator, StepHolder {
@@ -100,7 +100,6 @@ public Collection<String> getStepNames() {
100100
/* (non-Javadoc)
101101
* @see org.springframework.batch.core.step.StepLocator#getStep(java.lang.String)
102102
*/
103-
@Nullable
104103
@Override
105104
public Step getStep(String stepName) throws NoSuchStepException {
106105
Step result = null;

Diff for: spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/PartitionStep.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232
import org.springframework.batch.core.step.NoSuchStepException;
3333
import org.springframework.batch.core.step.StepLocator;
3434
import org.springframework.batch.item.ExecutionContext;
35-
import org.springframework.lang.Nullable;
3635

3736
/**
3837
* An extension of the {@link PartitionStep} that provides additional semantics
3938
* required by JSR-352. Specifically, this implementation adds the required
4039
* lifecycle calls to the {@link PartitionReducer} if it is used.
4140
*
4241
* @author Michael Minella
42+
* @author Mahmoud Ben Hassine
4343
* @since 3.0
4444
*/
4545
public class PartitionStep extends org.springframework.batch.core.partition.support.PartitionStep implements StepLocator {
@@ -103,7 +103,6 @@ public Collection<String> getStepNames() {
103103
/* (non-Javadoc)
104104
* @see org.springframework.batch.core.step.StepLocator#getStep(java.lang.String)
105105
*/
106-
@Nullable
107106
@Override
108107
public Step getStep(String stepName) throws NoSuchStepException {
109108
JsrPartitionHandler partitionHandler = (JsrPartitionHandler) getPartitionHandler();

Diff for: spring-batch-core/src/test/java/org/springframework/batch/core/configuration/support/DefaultJobLoaderTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
/**
4343
* @author Dave Syer
4444
* @author Stephane Nicoll
45+
* @author Mahmoud Ben Hassine
4546
*/
4647
public class DefaultJobLoaderTests {
4748

@@ -266,7 +267,6 @@ public Collection<String> getStepNames() {
266267
return Collections.emptyList();
267268
}
268269

269-
@Nullable
270270
@Override
271271
public Step getStep(String stepName) throws NoSuchStepException {
272272
throw new NoSuchStepException("Step [" + stepName + "] does not exist");

Diff for: spring-batch-core/src/test/java/org/springframework/batch/core/job/ExtendedAbstractJobTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242

4343
/**
4444
* @author Dave Syer
45+
* @author Mahmoud Ben Hassine
4546
*
4647
*/
4748
public class ExtendedAbstractJobTests {
@@ -215,7 +216,6 @@ public StubJob() {
215216
protected void doExecute(JobExecution execution) throws JobExecutionException {
216217
}
217218

218-
@Nullable
219219
@Override
220220
public Step getStep(String stepName) {
221221
return null;

Diff for: spring-batch-core/src/test/java/org/springframework/batch/core/job/JobSupport.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
*
4242
* @author Lucas Ward
4343
* @author Dave Syer
44+
* @author Mahmoud Ben Hassine
4445
*/
4546
public class JobSupport implements BeanNameAware, Job, StepLocator {
4647

@@ -192,7 +193,6 @@ public Collection<String> getStepNames() {
192193
return steps.keySet();
193194
}
194195

195-
@Nullable
196196
@Override
197197
public Step getStep(String stepName) throws NoSuchStepException {
198198
final Step step = steps.get(stepName);

Diff for: spring-batch-core/src/test/java/org/springframework/batch/core/launch/support/SimpleJobOperatorTests.java

-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,6 @@ class MockJob extends AbstractJob {
453453

454454
private TaskletStep taskletStep;
455455

456-
@Nullable
457456
@Override
458457
public Step getStep(String stepName) {
459458
return taskletStep;

Diff for: spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/FlatFileItemReader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ protected T doRead() throws Exception {
192192
* @return next line (skip comments).getCurrentResource
193193
*/
194194
@Nullable
195-
protected String readLine() {
195+
private String readLine() {
196196

197197
if (reader == null) {
198198
throw new ReaderNotOpenException("Reader must be open before it can be read.");

Diff for: spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/BeanFactoryStepLocator.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
import org.springframework.beans.factory.BeanFactory;
1010
import org.springframework.beans.factory.BeanFactoryAware;
1111
import org.springframework.beans.factory.ListableBeanFactory;
12-
import org.springframework.lang.Nullable;
1312
import org.springframework.util.Assert;
1413

1514
/**
1615
* A {@link StepLocator} implementation that just looks in its enclosing bean
1716
* factory for components of type {@link Step}.
1817
*
1918
* @author Dave Syer
19+
* @author Mahmoud Ben Hassine
2020
*
2121
*/
2222
public class BeanFactoryStepLocator implements StepLocator, BeanFactoryAware {
@@ -31,7 +31,6 @@ public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
3131
* Look up a bean with the provided name of type {@link Step}.
3232
* @see StepLocator#getStep(String)
3333
*/
34-
@Nullable
3534
public Step getStep(String stepName) {
3635
return beanFactory.getBean(stepName, Step.class);
3736
}

0 commit comments

Comments
 (0)