diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/AbstractJob.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/AbstractJob.java index d099f5d7d..808f1c450 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/AbstractJob.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/AbstractJob.java @@ -165,7 +165,6 @@ InitializingBean { * @param stepName name of the step * @return the Step */ - @Nullable @Override public abstract Step getStep(String stepName); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleJob.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleJob.java index 403b41a09..1ac8cef78 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleJob.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleJob.java @@ -29,7 +29,6 @@ import org.springframework.batch.core.Step; import org.springframework.batch.core.StepExecution; import org.springframework.batch.core.repository.JobRestartException; import org.springframework.batch.core.step.StepLocator; -import org.springframework.lang.Nullable; /** * Simple implementation of {@link Job} interface providing the ability to run a @@ -40,6 +39,7 @@ import org.springframework.lang.Nullable; * @author Lucas Ward * @author Dave Syer * @author Michael Minella + * @author Mahmoud Ben Hassine */ public class SimpleJob extends AbstractJob { @@ -103,7 +103,6 @@ public class SimpleJob extends AbstractJob { * @see * org.springframework.batch.core.job.AbstractJob#getStep(java.lang.String) */ - @Nullable @Override public Step getStep(String stepName) { for (Step step : this.steps) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowJob.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowJob.java index 4455d6e55..6a762b303 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowJob.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowJob.java @@ -27,7 +27,6 @@ import org.springframework.batch.core.job.AbstractJob; import org.springframework.batch.core.job.SimpleStepHandler; import org.springframework.batch.core.step.StepHolder; import org.springframework.batch.core.step.StepLocator; -import org.springframework.lang.Nullable; /** * Implementation of the {@link Job} interface that allows for complex flows of @@ -36,6 +35,7 @@ import org.springframework.lang.Nullable; * namespace to abstract away details. * * @author Dave Syer + * @author Mahmoud Ben Hassine * @since 2.0 */ public class FlowJob extends AbstractJob { @@ -74,7 +74,6 @@ public class FlowJob extends AbstractJob { /** * {@inheritDoc} */ - @Nullable @Override public Step getStep(String stepName) { if (!initialized) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/StepState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/StepState.java index 33850d2e8..bde475e47 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/StepState.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/StepState.java @@ -27,7 +27,6 @@ import org.springframework.batch.core.job.flow.State; import org.springframework.batch.core.step.NoSuchStepException; import org.springframework.batch.core.step.StepHolder; import org.springframework.batch.core.step.StepLocator; -import org.springframework.lang.Nullable; /** * {@link State} implementation that delegates to a {@link FlowExecutor} to @@ -35,6 +34,7 @@ import org.springframework.lang.Nullable; * * @author Dave Syer * @author Michael Minella + * @author Mahmoud Ben Hassine * @since 2.0 */ public class StepState extends AbstractState implements StepLocator, StepHolder { @@ -100,7 +100,6 @@ public class StepState extends AbstractState implements StepLocator, StepHolder /* (non-Javadoc) * @see org.springframework.batch.core.step.StepLocator#getStep(java.lang.String) */ - @Nullable @Override public Step getStep(String stepName) throws NoSuchStepException { Step result = null; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/PartitionStep.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/PartitionStep.java index a5adb93c3..cb69187ea 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/PartitionStep.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/PartitionStep.java @@ -32,7 +32,6 @@ import org.springframework.batch.core.partition.support.StepExecutionAggregator; import org.springframework.batch.core.step.NoSuchStepException; import org.springframework.batch.core.step.StepLocator; import org.springframework.batch.item.ExecutionContext; -import org.springframework.lang.Nullable; /** * An extension of the {@link PartitionStep} that provides additional semantics @@ -40,6 +39,7 @@ import org.springframework.lang.Nullable; * lifecycle calls to the {@link PartitionReducer} if it is used. * * @author Michael Minella + * @author Mahmoud Ben Hassine * @since 3.0 */ public class PartitionStep extends org.springframework.batch.core.partition.support.PartitionStep implements StepLocator { @@ -103,7 +103,6 @@ public class PartitionStep extends org.springframework.batch.core.partition.supp /* (non-Javadoc) * @see org.springframework.batch.core.step.StepLocator#getStep(java.lang.String) */ - @Nullable @Override public Step getStep(String stepName) throws NoSuchStepException { JsrPartitionHandler partitionHandler = (JsrPartitionHandler) getPartitionHandler(); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/support/DefaultJobLoaderTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/support/DefaultJobLoaderTests.java index c955d6a8b..04b6126e7 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/support/DefaultJobLoaderTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/support/DefaultJobLoaderTests.java @@ -42,6 +42,7 @@ import org.springframework.test.util.ReflectionTestUtils; /** * @author Dave Syer * @author Stephane Nicoll + * @author Mahmoud Ben Hassine */ public class DefaultJobLoaderTests { @@ -266,7 +267,6 @@ public class DefaultJobLoaderTests { return Collections.emptyList(); } - @Nullable @Override public Step getStep(String stepName) throws NoSuchStepException { throw new NoSuchStepException("Step [" + stepName + "] does not exist"); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/job/ExtendedAbstractJobTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/job/ExtendedAbstractJobTests.java index fae9c3aef..574f0e3c4 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/job/ExtendedAbstractJobTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/job/ExtendedAbstractJobTests.java @@ -42,6 +42,7 @@ import static org.junit.Assert.fail; /** * @author Dave Syer + * @author Mahmoud Ben Hassine * */ public class ExtendedAbstractJobTests { @@ -215,7 +216,6 @@ public class ExtendedAbstractJobTests { protected void doExecute(JobExecution execution) throws JobExecutionException { } - @Nullable @Override public Step getStep(String stepName) { return null; diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/job/JobSupport.java b/spring-batch-core/src/test/java/org/springframework/batch/core/job/JobSupport.java index 3e5bf81f6..8a0b14a71 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/job/JobSupport.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/job/JobSupport.java @@ -41,6 +41,7 @@ import org.springframework.util.ClassUtils; * * @author Lucas Ward * @author Dave Syer + * @author Mahmoud Ben Hassine */ public class JobSupport implements BeanNameAware, Job, StepLocator { @@ -192,7 +193,6 @@ public class JobSupport implements BeanNameAware, Job, StepLocator { return steps.keySet(); } - @Nullable @Override public Step getStep(String stepName) throws NoSuchStepException { final Step step = steps.get(stepName); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/support/SimpleJobOperatorTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/support/SimpleJobOperatorTests.java index 9eae8ca5d..052ceeb79 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/support/SimpleJobOperatorTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/support/SimpleJobOperatorTests.java @@ -453,7 +453,6 @@ public class SimpleJobOperatorTests { private TaskletStep taskletStep; - @Nullable @Override public Step getStep(String stepName) { return taskletStep; diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/FlatFileItemReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/FlatFileItemReader.java index c5eeddef4..1d1cf8463 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/FlatFileItemReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/FlatFileItemReader.java @@ -192,7 +192,7 @@ public class FlatFileItemReader extends AbstractItemCountingItemStreamItemRea * @return next line (skip comments).getCurrentResource */ @Nullable - protected String readLine() { + private String readLine() { if (reader == null) { throw new ReaderNotOpenException("Reader must be open before it can be read."); diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/BeanFactoryStepLocator.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/BeanFactoryStepLocator.java index 46681d00b..d034d84d4 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/BeanFactoryStepLocator.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/BeanFactoryStepLocator.java @@ -9,7 +9,6 @@ import org.springframework.beans.BeansException; import org.springframework.beans.factory.BeanFactory; import org.springframework.beans.factory.BeanFactoryAware; import org.springframework.beans.factory.ListableBeanFactory; -import org.springframework.lang.Nullable; import org.springframework.util.Assert; /** @@ -17,6 +16,7 @@ import org.springframework.util.Assert; * factory for components of type {@link Step}. * * @author Dave Syer + * @author Mahmoud Ben Hassine * */ public class BeanFactoryStepLocator implements StepLocator, BeanFactoryAware { @@ -31,7 +31,6 @@ public class BeanFactoryStepLocator implements StepLocator, BeanFactoryAware { * Look up a bean with the provided name of type {@link Step}. * @see StepLocator#getStep(String) */ - @Nullable public Step getStep(String stepName) { return beanFactory.getBean(stepName, Step.class); }