> reachableElementMap,
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractStepParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractStepParser.java
index 8d33cb0b1..f17052fc6 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractStepParser.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractStepParser.java
@@ -15,6 +15,10 @@
*/
package org.springframework.batch.core.configuration.xml;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
import org.springframework.batch.core.listener.StepListenerMetaData;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.factory.config.BeanDefinition;
@@ -28,9 +32,6 @@ import org.springframework.beans.factory.xml.BeanDefinitionParserDelegate;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.util.StringUtils;
import org.springframework.util.xml.DomUtils;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
/**
* Internal parser for the <step/> elements inside a job. A step element
@@ -89,7 +90,7 @@ public abstract class AbstractStepParser {
/**
* @param stepElement The <step/> element
- * @param parserContext
+ * @param parserContext context
* @param jobFactoryRef the reference to the {@link JobParserJobFactoryBean}
* from the enclosing tag. Use 'null' if unknown.
*/
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/ChunkElementParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/ChunkElementParser.java
index 693b52c05..fe93f7961 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/ChunkElementParser.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/ChunkElementParser.java
@@ -17,6 +17,8 @@ package org.springframework.batch.core.configuration.xml;
import java.util.List;
+import org.w3c.dom.Element;
+
import org.springframework.batch.core.listener.StepListenerMetaData;
import org.springframework.batch.repeat.policy.SimpleCompletionPolicy;
import org.springframework.beans.BeanMetadataElement;
@@ -35,7 +37,6 @@ import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import org.springframework.util.xml.DomUtils;
-import org.w3c.dom.Element;
/**
* Internal parser for the <chunk/> element inside a step.
@@ -67,8 +68,8 @@ public class ChunkElementParser {
StepListenerMetaData.itemListenerMetaData());
/**
- * @param element
- * @param parserContext
+ * @param element the element to parse
+ * @param parserContext the context to use
*/
protected void parse(Element element, AbstractBeanDefinition bd, ParserContext parserContext, boolean underspecified) {
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 13de19049..87ed5ad32 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
@@ -85,7 +85,7 @@ InitializingBean {
* Convenience constructor to immediately add name (which is mandatory but
* not final).
*
- * @param name
+ * @param name name of the job
*/
public AbstractJob(String name) {
super();
@@ -154,7 +154,7 @@ InitializingBean {
* Retrieve the step with the given name. If there is no Step with the given
* name, then return null.
*
- * @param stepName
+ * @param stepName name of the step
* @return the Step
*/
@Override
@@ -242,7 +242,7 @@ InitializingBean {
* state of the batch meta domain (jobs, steps, executions) during the life
* of a job.
*
- * @param jobRepository
+ * @param jobRepository repository to use during the job execution
*/
public void setJobRepository(JobRepository jobRepository) {
this.jobRepository = jobRepository;
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 b69e9d068..aef9f3176 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
@@ -67,11 +67,7 @@ public class StepState extends AbstractState implements StepLocator, StepHolder
return new FlowExecutionStatus(executor.executeStep(step));
}
- /**
- * @deprecated in favor of using {@link StepLocator#getStep(String)}.
- */
@Override
- @Deprecated
public Step getStep() {
return step;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JobListenerAdapter.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JobListenerAdapter.java
index afdadeb29..570e1c0de 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JobListenerAdapter.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JobListenerAdapter.java
@@ -37,7 +37,7 @@ public class JobListenerAdapter implements JobExecutionListener {
* @param delegate to be delegated to
*/
public JobListenerAdapter(JobListener delegate) {
- Assert.notNull(delegate);
+ Assert.notNull(delegate, "Delegate is required");
this.delegate = delegate;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/BatchletStep.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/BatchletStep.java
index 35842893b..877608bf4 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/BatchletStep.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/BatchletStep.java
@@ -39,7 +39,7 @@ public class BatchletStep extends TaskletStep {
*/
public BatchletStep(String name, BatchPropertyContext propertyContext) {
super(name);
- Assert.notNull(propertyContext);
+ Assert.notNull(propertyContext, "A propertyContext is required");
this.propertyContext = propertyContext;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/CommandLineJobRunner.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/CommandLineJobRunner.java
index b25f99237..5ab100fcf 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/CommandLineJobRunner.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/CommandLineJobRunner.java
@@ -15,8 +15,22 @@
*/
package org.springframework.batch.core.launch.support;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.ExitStatus;
import org.springframework.batch.core.Job;
@@ -44,19 +58,6 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
/**
*
* Basic launcher for starting jobs from the command line. In general, it is
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/AbstractListenerFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/AbstractListenerFactoryBean.java
index d698dc245..b5b0f0551 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/AbstractListenerFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/AbstractListenerFactoryBean.java
@@ -15,9 +15,6 @@
*/
package org.springframework.batch.core.listener;
-import static org.springframework.batch.support.MethodInvokerUtils.getMethodInvokerByAnnotation;
-import static org.springframework.batch.support.MethodInvokerUtils.getMethodInvokerForInterface;
-
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@@ -26,6 +23,7 @@ import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
import org.springframework.aop.TargetSource;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.framework.ProxyFactory;
@@ -37,6 +35,9 @@ import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.Ordered;
import org.springframework.util.Assert;
+import static org.springframework.batch.support.MethodInvokerUtils.getMethodInvokerByAnnotation;
+import static org.springframework.batch.support.MethodInvokerUtils.getMethodInvokerForInterface;
+
/**
* {@link FactoryBean} implementation that builds a listener based on the
* various lifecycle methods or annotations that are provided. There are three
@@ -157,7 +158,10 @@ public abstract class AbstractListenerFactoryBean implements FactoryBean context, OutputStream out) throws IOException {
- Assert.notNull(context);
- Assert.notNull(out);
+ Assert.notNull(context, "context is required");
+ Assert.notNull(out, "OutputStream is required");
for(Object value : context.values()) {
- Assert.notNull(value);
+ Assert.notNull(value, "A null value was found");
if (!(value instanceof Serializable)) {
throw new IllegalArgumentException(
"Value: [ " + value + "must be serializable."
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/Jackson2ExecutionContextStringSerializer.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/Jackson2ExecutionContextStringSerializer.java
index 753f990ec..6233cfeca 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/Jackson2ExecutionContextStringSerializer.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/Jackson2ExecutionContextStringSerializer.java
@@ -15,19 +15,20 @@
*/
package org.springframework.batch.core.repository.dao;
-import com.fasterxml.jackson.core.type.TypeReference;
-import com.fasterxml.jackson.databind.DeserializationFeature;
-import com.fasterxml.jackson.databind.MapperFeature;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import org.springframework.batch.core.repository.ExecutionContextSerializer;
-import org.springframework.util.Assert;
-
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.HashMap;
import java.util.Map;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.MapperFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+import org.springframework.batch.core.repository.ExecutionContextSerializer;
+import org.springframework.util.Assert;
+
/**
* Implementation that uses Jackson2 to provide (de)serialization.
*
@@ -60,8 +61,8 @@ public class Jackson2ExecutionContextStringSerializer implements ExecutionContex
public void serialize(Map context, OutputStream out) throws IOException {
- Assert.notNull(context);
- Assert.notNull(out);
+ Assert.notNull(context, "A context is required");
+ Assert.notNull(out, "An OutputStream is required");
objectMapper.writeValue(out, context);
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobExecutionDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobExecutionDao.java
index 0c89f028b..734881f64 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobExecutionDao.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobExecutionDao.java
@@ -172,7 +172,7 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements
*/
private void validateJobExecution(JobExecution jobExecution) {
- Assert.notNull(jobExecution);
+ Assert.notNull(jobExecution, "jobExecution cannot be null");
Assert.notNull(jobExecution.getJobId(), "JobExecution Job-Id cannot be null.");
Assert.notNull(jobExecution.getStatus(), "JobExecution status cannot be null.");
Assert.notNull(jobExecution.getCreateTime(), "JobExecution create time cannot be null");
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobInstanceDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobInstanceDao.java
index 441ff2d0d..1d618c5f3 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobInstanceDao.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobInstanceDao.java
@@ -153,7 +153,7 @@ JobInstanceDao, InitializingBean {
if (instances.isEmpty()) {
return null;
} else {
- Assert.state(instances.size() == 1);
+ Assert.state(instances.size() == 1, "instance counte must be 1 but was " + instances.size());
return instances.get(0);
}
}
@@ -282,7 +282,7 @@ JobInstanceDao, InitializingBean {
@Override
public void afterPropertiesSet() throws Exception {
super.afterPropertiesSet();
- Assert.notNull(jobIncrementer);
+ Assert.notNull(jobIncrementer, "JobIncrementer is required");
}
/**
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcStepExecutionDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcStepExecutionDao.java
index 1a8082470..3cec3edcc 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcStepExecutionDao.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcStepExecutionDao.java
@@ -211,7 +211,7 @@ public class JdbcStepExecutionDao extends AbstractJdbcBatchMetadataDao implement
* @throws IllegalArgumentException
*/
private void validateStepExecution(StepExecution stepExecution) {
- Assert.notNull(stepExecution);
+ Assert.notNull(stepExecution, "stepExecution is required");
Assert.notNull(stepExecution.getStepName(), "StepExecution step name cannot be null.");
Assert.notNull(stepExecution.getStartTime(), "StepExecution start time cannot be null.");
Assert.notNull(stepExecution.getStatus(), "StepExecution status cannot be null.");
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapJobExecutionDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapJobExecutionDao.java
index cef950b0e..b037297cd 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapJobExecutionDao.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapJobExecutionDao.java
@@ -53,7 +53,7 @@ public class MapJobExecutionDao implements JobExecutionDao {
@Override
public void saveJobExecution(JobExecution jobExecution) {
- Assert.isTrue(jobExecution.getId() == null);
+ Assert.isTrue(jobExecution.getId() == null, "jobExecution id is not null");
Long newId = currentId.getAndIncrement();
jobExecution.setId(newId);
jobExecution.incrementVersion();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapStepExecutionDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapStepExecutionDao.java
index fbfee278d..fda49cb40 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapStepExecutionDao.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapStepExecutionDao.java
@@ -68,8 +68,8 @@ public class MapStepExecutionDao implements StepExecutionDao {
@Override
public void saveStepExecution(StepExecution stepExecution) {
- Assert.isTrue(stepExecution.getId() == null);
- Assert.isTrue(stepExecution.getVersion() == null);
+ Assert.isTrue(stepExecution.getId() == null, "stepExecution id was not null");
+ Assert.isTrue(stepExecution.getVersion() == null, "stepExecution version was not null");
Assert.notNull(stepExecution.getJobExecutionId(), "JobExecution must be saved already.");
Map executions = executionsByJobExecutionId.get(stepExecution.getJobExecutionId());
@@ -89,7 +89,7 @@ public class MapStepExecutionDao implements StepExecutionDao {
@Override
public void updateStepExecution(StepExecution stepExecution) {
- Assert.notNull(stepExecution.getJobExecutionId());
+ Assert.notNull(stepExecution.getJobExecutionId(), "jobExecution id is null");
Map executions = executionsByJobExecutionId.get(stepExecution.getJobExecutionId());
Assert.notNull(executions, "step executions for given job execution are expected to be already saved");
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/XStreamExecutionContextStringSerializer.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/XStreamExecutionContextStringSerializer.java
index b5b21dc03..aef0bd75b 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/XStreamExecutionContextStringSerializer.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/XStreamExecutionContextStringSerializer.java
@@ -45,6 +45,7 @@ import org.springframework.util.Assert;
* versions, this serializer is depricated in favor of
* {@link Jackson2ExecutionContextStringSerializer}
*/
+@Deprecated
public class XStreamExecutionContextStringSerializer implements ExecutionContextSerializer, InitializingBean {
private ReflectionProvider reflectionProvider = null;
@@ -87,8 +88,8 @@ public class XStreamExecutionContextStringSerializer implements ExecutionContext
*/
@Override
public void serialize(Map context, OutputStream out) throws IOException {
- Assert.notNull(context);
- Assert.notNull(out);
+ Assert.notNull(context, "context is required");
+ Assert.notNull(out, "An OutputStream is required");
out.write(xstream.toXML(context).getBytes());
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java
index 52bcb2510..78b5e5259 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java
@@ -136,7 +136,7 @@ public abstract class AbstractStep implements Step, InitializingBean, BeanNameAw
/**
* Convenient constructor for setting only the name property.
*
- * @param name
+ * @param name Name of the step
*/
public AbstractStep(String name) {
this.name = name;
@@ -147,7 +147,7 @@ public abstract class AbstractStep implements Step, InitializingBean, BeanNameAw
* {@link StepExecution} before returning.
*
* @param stepExecution the current step context
- * @throws Exception
+ * @throws Exception checked exception thrown by implementation
*/
protected abstract void doExecute(StepExecution stepExecution) throws Exception;
@@ -156,7 +156,7 @@ public abstract class AbstractStep implements Step, InitializingBean, BeanNameAw
* acquire resources. Does nothing by default.
*
* @param ctx the {@link ExecutionContext} to use
- * @throws Exception
+ * @throws Exception checked exception thrown by implementation
*/
protected void open(ExecutionContext ctx) throws Exception {
}
@@ -166,7 +166,7 @@ public abstract class AbstractStep implements Step, InitializingBean, BeanNameAw
* of the finally block), to close or release resources. Does nothing by default.
*
* @param ctx the {@link ExecutionContext} to use
- * @throws Exception
+ * @throws Exception checked exception thrown by implementation
*/
protected void close(ExecutionContext ctx) throws Exception {
}
@@ -293,7 +293,7 @@ public abstract class AbstractStep implements Step, InitializingBean, BeanNameAw
/**
* Registers the {@link StepExecution} for property resolution via {@link StepScope}
*
- * @param stepExecution
+ * @param stepExecution StepExecution to use when hydrating the StepScoped beans
*/
protected void doExecutionRegistration(StepExecution stepExecution) {
StepSynchronizationManager.register(stepExecution);
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/FaultTolerantStepBuilder.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/FaultTolerantStepBuilder.java
index 50af6e377..ae900078e 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/FaultTolerantStepBuilder.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/FaultTolerantStepBuilder.java
@@ -198,7 +198,7 @@ public class FaultTolerantStepBuilder extends SimpleStepBuilder {
*/
@Override
@SuppressWarnings("unchecked")
- public SimpleStepBuilder listener(Object listener) {
+ public SimpleStepBuilder listener(Object listener) {
super.listener(listener);
Set skipListenerMethods = new HashSet();
@@ -224,7 +224,7 @@ public class FaultTolerantStepBuilder extends SimpleStepBuilder {
}
@SuppressWarnings("unchecked")
- SimpleStepBuilder result = this;
+ SimpleStepBuilder result = this;
return result;
}
@@ -548,12 +548,9 @@ public class FaultTolerantStepBuilder extends SimpleStepBuilder {
types.add(ExhaustedRetryException.class);
final Classifier panic = new BinaryExceptionClassifier(types, true);
- classifier = new Classifier() {
- @Override
- public Boolean classify(Throwable classifiable) {
- // Rollback if either the user's list or our own applies
- return panic.classify(classifiable) || binary.classify(classifiable);
- }
+ classifier = (Classifier) classifiable -> {
+ // Rollback if either the user's list or our own applies
+ return panic.classify(classifiable) || binary.classify(classifiable);
};
}
@@ -700,8 +697,9 @@ public class FaultTolerantStepBuilder extends SimpleStepBuilder {
return skipPolicyWrapper;
}
+ @SuppressWarnings("unchecked")
private void addNonSkippableExceptionIfMissing(Class extends Throwable>... cls) {
- List> exceptions = new ArrayList>();
+ List> exceptions = new ArrayList<>();
for (Class extends Throwable> exceptionClass : nonSkippableExceptionClasses) {
exceptions.add(exceptionClass);
}
@@ -713,8 +711,9 @@ public class FaultTolerantStepBuilder extends SimpleStepBuilder {
nonSkippableExceptionClasses = exceptions;
}
+ @SuppressWarnings("unchecked")
private void addNonRetryableExceptionIfMissing(Class extends Throwable>... cls) {
- List> exceptions = new ArrayList>();
+ List> exceptions = new ArrayList<>();
for (Class extends Throwable> exceptionClass : nonRetryableExceptionClasses) {
exceptions.add(exceptionClass);
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/SimpleStepBuilder.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/SimpleStepBuilder.java
index faeb7d3ea..0892e9ec1 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/SimpleStepBuilder.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/SimpleStepBuilder.java
@@ -249,10 +249,10 @@ public class SimpleStepBuilder extends AbstractTaskletStepBuilder listener(Object listener) {
super.listener(listener);
- Set itemListenerMethods = new HashSet();
+ Set itemListenerMethods = new HashSet<>();
itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeRead.class));
itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), AfterRead.class));
itemListenerMethods.addAll(ReflectionUtils.findMethod(listener.getClass(), BeforeProcess.class));
@@ -270,7 +270,7 @@ public class SimpleStepBuilder extends AbstractTaskletStepBuilder result = this;
return result;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/Chunk.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/Chunk.java
index e12662f65..6465652a6 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/Chunk.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/Chunk.java
@@ -66,7 +66,7 @@ public class Chunk implements Iterable {
/**
* Add the item to the chunk.
- * @param item
+ * @param item the item to add
*/
public void add(W item) {
items.add(item);
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/ChunkOrientedTasklet.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/ChunkOrientedTasklet.java
index 79edda304..c7eb3102e 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/ChunkOrientedTasklet.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/ChunkOrientedTasklet.java
@@ -54,7 +54,7 @@ public class ChunkOrientedTasklet implements Tasklet {
* readers. Main (or only) use case for setting this flag to false is a
* transactional JMS item reader.
*
- * @param buffering
+ * @param buffering indicator
*/
public void setBuffering(boolean buffering) {
this.buffering = buffering;
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/CallableTaskletAdapter.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/CallableTaskletAdapter.java
index 906af7753..d19abbce6 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/CallableTaskletAdapter.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/CallableTaskletAdapter.java
@@ -49,7 +49,7 @@ public class CallableTaskletAdapter implements Tasklet, InitializingBean {
*/
@Override
public void afterPropertiesSet() throws Exception {
- Assert.notNull(callable);
+ Assert.notNull(callable, "A Callable is required");
}
/**
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/ConfigurableSystemProcessExitCodeMapper.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/ConfigurableSystemProcessExitCodeMapper.java
index 0f4dca290..bbc02b38b 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/ConfigurableSystemProcessExitCodeMapper.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/ConfigurableSystemProcessExitCodeMapper.java
@@ -50,7 +50,7 @@ public class ConfigurableSystemProcessExitCodeMapper implements SystemProcessExi
* {@link org.springframework.batch.core.ExitStatus} values.
*/
public void setMappings(Map