diff --git a/archetypes/simple-cli/pom.xml b/archetypes/simple-cli/pom.xml
index ad3ed2ae9..c9a6e712a 100644
--- a/archetypes/simple-cli/pom.xml
+++ b/archetypes/simple-cli/pom.xml
@@ -200,8 +200,8 @@
org.apache.maven.plugins
maven-compiler-plugin
- 1.5
- 1.5
+ 1.6
+ 1.6
diff --git a/spring-batch-core-tests/pom.xml b/spring-batch-core-tests/pom.xml
index 2fcb89c9d..d505f1caf 100644
--- a/spring-batch-core-tests/pom.xml
+++ b/spring-batch-core-tests/pom.xml
@@ -12,18 +12,6 @@
../spring-batch-parent
-
- tiger
-
- 1.5
-
-
-
- stax
- stax
-
-
-
default
diff --git a/spring-batch-core/pom.xml b/spring-batch-core/pom.xml
index c36143482..728ab88a2 100644
--- a/spring-batch-core/pom.xml
+++ b/spring-batch-core/pom.xml
@@ -12,24 +12,6 @@
2.2.0.BUILD-SNAPSHOT
../spring-batch-parent
-
-
- tiger
-
- 1.5
-
-
-
- stax
- stax
-
-
- javax.annotation
- jsr250-api
-
-
-
-
org.springframework.batch
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/Entity.java b/spring-batch-core/src/main/java/org/springframework/batch/core/Entity.java
index 4b7b95b10..2d26a4a22 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/Entity.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/Entity.java
@@ -124,6 +124,7 @@ public class Entity implements Serializable {
*
* @see java.lang.Object#hashCode()
*/
+ @Override
public int hashCode() {
if (id == null) {
return super.hashCode();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/ExitStatus.java b/spring-batch-core/src/main/java/org/springframework/batch/core/ExitStatus.java
index 8146a8c55..d0dc8980f 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/ExitStatus.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/ExitStatus.java
@@ -139,6 +139,7 @@ public class ExitStatus implements Serializable, Comparable {
* @param status an {@link ExitStatus} to compare
* @return 1,0,-1 according to the severity and exit code
*/
+ @Override
public int compareTo(ExitStatus status) {
if (severity(status) > severity(this)) {
return -1;
@@ -180,6 +181,7 @@ public class ExitStatus implements Serializable, Comparable {
*
* @see java.lang.Object#toString()
*/
+ @Override
public String toString() {
return String.format("exitCode=%s;exitDescription=%s", exitCode, exitDescription);
}
@@ -189,6 +191,7 @@ public class ExitStatus implements Serializable, Comparable {
*
* @see java.lang.Object#equals(java.lang.Object)
*/
+ @Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
@@ -201,6 +204,7 @@ public class ExitStatus implements Serializable, Comparable {
*
* @see java.lang.Object#hashCode()
*/
+ @Override
public int hashCode() {
return toString().hashCode();
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/JobExecution.java b/spring-batch-core/src/main/java/org/springframework/batch/core/JobExecution.java
index 328dda516..7603e45bf 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/JobExecution.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/JobExecution.java
@@ -315,6 +315,7 @@ public class JobExecution extends Entity {
*
* @see org.springframework.batch.core.domain.Entity#toString()
*/
+ @Override
public String toString() {
return super.toString()
+ String.format(", startTime=%s, endTime=%s, lastUpdated=%s, status=%s, exitStatus=%s, job=[%s]",
@@ -332,4 +333,4 @@ public class JobExecution extends Entity {
}
}
-}
\ No newline at end of file
+}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/JobInstance.java b/spring-batch-core/src/main/java/org/springframework/batch/core/JobInstance.java
index 86482451c..f9b7798bf 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/JobInstance.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/JobInstance.java
@@ -65,6 +65,7 @@ public class JobInstance extends Entity {
return jobName;
}
+ @Override
public String toString() {
return super.toString() + ", JobParameters=[" + jobParameters + "]" + ", Job=[" + jobName + "]";
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/JobParameter.java b/spring-batch-core/src/main/java/org/springframework/batch/core/JobParameter.java
index f774b303b..ea58bc929 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/JobParameter.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/JobParameter.java
@@ -112,6 +112,7 @@ public class JobParameter implements Serializable {
: parameter.toString());
}
+ @Override
public int hashCode() {
return 7 + 21 * (parameter == null ? parameterType.hashCode() : parameter.hashCode());
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/StepContribution.java b/spring-batch-core/src/main/java/org/springframework/batch/core/StepContribution.java
index 171de9130..bbaba57dc 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/StepContribution.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/StepContribution.java
@@ -186,6 +186,7 @@ public class StepContribution implements Serializable {
*
* @see java.lang.Object#toString()
*/
+ @Override
public String toString() {
return "[StepContribution: read=" + readCount + ", written=" + writeCount + ", filtered=" + filterCount
+ ", readSkips=" + readSkipCount + ", writeSkips=" + writeSkipCount + ", processSkips="
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java b/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java
index 4d46bb266..648a77ba3 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/StepExecution.java
@@ -469,6 +469,7 @@ public class StepExecution extends Entity {
* org.springframework.batch.container.common.domain.Entity#equals(java.
* lang.Object)
*/
+ @Override
public boolean equals(Object obj) {
Object jobExecutionId = getJobExecutionId();
@@ -495,6 +496,7 @@ public class StepExecution extends Entity {
*
* @see org.springframework.batch.container.common.domain.Entity#hashCode()
*/
+ @Override
public int hashCode() {
Object jobExecutionId = getJobExecutionId();
Long id = getId();
@@ -502,6 +504,7 @@ public class StepExecution extends Entity {
* (jobExecutionId != null ? jobExecutionId.hashCode() : 0) + 59 * (id != null ? id.hashCode() : 0);
}
+ @Override
public String toString() {
return String.format(getSummary() + ", exitDescription=%s", exitStatus.getExitDescription());
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/ModularBatchConfiguration.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/ModularBatchConfiguration.java
index 37d44d5e1..1d0230850 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/ModularBatchConfiguration.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/ModularBatchConfiguration.java
@@ -47,16 +47,19 @@ public class ModularBatchConfiguration extends AbstractBatchConfiguration {
private AutomaticJobRegistrar registrar = new AutomaticJobRegistrar();
+ @Override
@Bean
public JobRepository jobRepository() throws Exception {
return getConfigurer(configurers).getJobRepository();
}
+ @Override
@Bean
public JobLauncher jobLauncher() throws Exception {
return getConfigurer(configurers).getJobLauncher();
}
+ @Override
@Bean
public PlatformTransactionManager transactionManager() throws Exception {
return getConfigurer(configurers).getTransactionManager();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/SimpleBatchConfiguration.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/SimpleBatchConfiguration.java
index 65b1c2ce1..c1952959a 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/SimpleBatchConfiguration.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/SimpleBatchConfiguration.java
@@ -58,21 +58,25 @@ public class SimpleBatchConfiguration extends AbstractBatchConfiguration {
private AtomicReference transactionManager = new AtomicReference();
+ @Override
@Bean
public JobRepository jobRepository() throws Exception {
return createLazyProxy(jobRepository, JobRepository.class);
}
+ @Override
@Bean
public JobLauncher jobLauncher() throws Exception {
return createLazyProxy(jobLauncher, JobLauncher.class);
}
+ @Override
@Bean
public JobRegistry jobRegistry() throws Exception {
return createLazyProxy(jobRegistry, JobRegistry.class);
}
+ @Override
@Bean
public PlatformTransactionManager transactionManager() throws Exception {
return createLazyProxy(transactionManager, PlatformTransactionManager.class);
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/ApplicationContextJobFactory.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/ApplicationContextJobFactory.java
index b68b3cb94..a489cb9af 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/ApplicationContextJobFactory.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/ApplicationContextJobFactory.java
@@ -48,6 +48,7 @@ public class ApplicationContextJobFactory implements JobFactory {
*
* @see org.springframework.batch.core.configuration.JobFactory#createJob()
*/
+ @Override
public final Job createJob() {
return job;
}
@@ -57,6 +58,7 @@ public class ApplicationContextJobFactory implements JobFactory {
*
* @see JobFactory#getJobName()
*/
+ @Override
public String getJobName() {
return job.getName();
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/DefaultJobLoader.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/DefaultJobLoader.java
index 6acefcfc6..228a0ee98 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/DefaultJobLoader.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/DefaultJobLoader.java
@@ -107,6 +107,7 @@ public class DefaultJobLoader implements JobLoader, InitializingBean {
*
* @see JobLoader#clear()
*/
+ @Override
public void clear() {
for (ConfigurableApplicationContext context : contexts.values()) {
if (context.isActive()) {
@@ -119,6 +120,7 @@ public class DefaultJobLoader implements JobLoader, InitializingBean {
contexts.clear();
}
+ @Override
public Collection reload(ApplicationContextFactory factory) {
// If the same factory is loaded twice the context can be closed
@@ -140,6 +142,7 @@ public class DefaultJobLoader implements JobLoader, InitializingBean {
}
}
+ @Override
public Collection load(ApplicationContextFactory factory) throws DuplicateJobException {
return doLoad(factory, false);
}
@@ -268,6 +271,7 @@ public class DefaultJobLoader implements JobLoader, InitializingBean {
}
+ @Override
public void afterPropertiesSet() {
Assert.notNull(jobRegistry, "Job registry could not be null.");
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/GroupAwareJob.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/GroupAwareJob.java
index 31af67c13..9a7cbbf22 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/GroupAwareJob.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/GroupAwareJob.java
@@ -67,6 +67,7 @@ public class GroupAwareJob implements Job {
this.delegate = delegate;
}
+ @Override
public void execute(JobExecution execution) {
delegate.execute(execution);
}
@@ -77,18 +78,22 @@ public class GroupAwareJob implements Job {
*
* @see org.springframework.batch.core.Job#getName()
*/
+ @Override
public String getName() {
return groupName==null ? delegate.getName() : groupName + SEPARATOR + delegate.getName();
}
+ @Override
public boolean isRestartable() {
return delegate.isRestartable();
}
+ @Override
public JobParametersIncrementer getJobParametersIncrementer() {
return delegate.getJobParametersIncrementer();
}
+ @Override
public JobParametersValidator getJobParametersValidator() {
return delegate.getJobParametersValidator();
}
@@ -121,4 +126,4 @@ public class GroupAwareJob implements Job {
return ClassUtils.getShortName(delegate.getClass()) + ": [name=" + getName() + "]";
}
-}
\ No newline at end of file
+}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/JobRegistryBeanPostProcessor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/JobRegistryBeanPostProcessor.java
index f8dccf717..59cf3f266 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/JobRegistryBeanPostProcessor.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/JobRegistryBeanPostProcessor.java
@@ -88,6 +88,7 @@ public class JobRegistryBeanPostProcessor implements BeanPostProcessor, BeanFact
* org.springframework.beans.factory.BeanFactoryAware#setBeanFactory(org
* .springframework.beans.factory.BeanFactory)
*/
+ @Override
public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
if (beanFactory instanceof DefaultListableBeanFactory) {
this.beanFactory = (DefaultListableBeanFactory) beanFactory;
@@ -99,6 +100,7 @@ public class JobRegistryBeanPostProcessor implements BeanPostProcessor, BeanFact
*
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
*/
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(jobRegistry, "JobRegistry must not be null");
}
@@ -108,6 +110,7 @@ public class JobRegistryBeanPostProcessor implements BeanPostProcessor, BeanFact
* post processor.
* @see org.springframework.beans.factory.DisposableBean#destroy()
*/
+ @Override
public void destroy() throws Exception {
for (String name : jobNames) {
logger.debug("Unregistering job: " + name);
@@ -123,6 +126,7 @@ public class JobRegistryBeanPostProcessor implements BeanPostProcessor, BeanFact
* @see org.springframework.beans.factory.config.BeanPostProcessor#postProcessAfterInitialization(java.lang.Object,
* java.lang.String)
*/
+ @Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
if (bean instanceof Job) {
Job job = (Job) bean;
@@ -165,6 +169,7 @@ public class JobRegistryBeanPostProcessor implements BeanPostProcessor, BeanFact
* @see org.springframework.beans.factory.config.BeanPostProcessor#postProcessBeforeInitialization(java.lang.Object,
* java.lang.String)
*/
+ @Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
return bean;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/MapJobRegistry.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/MapJobRegistry.java
index 0787440d0..f97c26ece 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/MapJobRegistry.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/MapJobRegistry.java
@@ -41,6 +41,7 @@ public class MapJobRegistry implements JobRegistry {
// The "final" ensures that it is visible and initialized when the constructor resolves.
private final ConcurrentMap map = new ConcurrentHashMap();
+ @Override
public void register(JobFactory jobFactory) throws DuplicateJobException {
Assert.notNull(jobFactory);
String name = jobFactory.getJobName();
@@ -52,11 +53,13 @@ public class MapJobRegistry implements JobRegistry {
}
}
+ @Override
public void unregister(String name) {
Assert.notNull(name, "Job configuration must have a name.");
map.remove(name);
}
+ @Override
public Job getJob(String name) throws NoSuchJobException {
JobFactory factory = map.get(name);
if (factory == null) {
@@ -69,6 +72,7 @@ public class MapJobRegistry implements JobRegistry {
/**
* Provides an unmodifiable view of the job names.
*/
+ @Override
public Set getJobNames() {
return Collections.unmodifiableSet(map.keySet());
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/MapStepRegistry.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/MapStepRegistry.java
index d4d4dffc2..0fc7ca50c 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/MapStepRegistry.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/MapStepRegistry.java
@@ -24,6 +24,7 @@ public class MapStepRegistry implements StepRegistry {
private final ConcurrentMap> map = new ConcurrentHashMap>();
+ @Override
public void register(String jobName, Collection steps) throws DuplicateJobException {
Assert.notNull(jobName, "The job name cannot be null.");
Assert.notNull(steps, "The job steps cannot be null.");
@@ -40,11 +41,13 @@ public class MapStepRegistry implements StepRegistry {
}
}
+ @Override
public void unregisterStepsFromJob(String jobName) {
Assert.notNull(jobName, "Job configuration must have a name.");
map.remove(jobName);
}
+ @Override
public Step getStep(String jobName, String stepName) throws NoSuchJobException {
Assert.notNull(jobName, "The job name cannot be null.");
Assert.notNull(stepName, "The step name cannot be null.");
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/OsgiBundleXmlApplicationContextFactory.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/OsgiBundleXmlApplicationContextFactory.java
index e83d7fc3c..df4d62484 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/OsgiBundleXmlApplicationContextFactory.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/OsgiBundleXmlApplicationContextFactory.java
@@ -61,6 +61,7 @@ public class OsgiBundleXmlApplicationContextFactory implements BundleContextAwar
*
* @see org.springframework.context.ApplicationContextAware#setApplicationContext(org.springframework.context.ApplicationContext)
*/
+ @Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
parent = applicationContext;
}
@@ -71,6 +72,7 @@ public class OsgiBundleXmlApplicationContextFactory implements BundleContextAwar
*
* @see org.springframework.osgi.context.BundleContextAware#setBundleContext(org.osgi.framework.BundleContext)
*/
+ @Override
public void setBundleContext(BundleContext context) {
this.bundleContext = context;
}
@@ -82,6 +84,7 @@ public class OsgiBundleXmlApplicationContextFactory implements BundleContextAwar
*
* @see ApplicationContextFactory#createApplicationContext()
*/
+ @Override
public ConfigurableApplicationContext createApplicationContext() {
OsgiBundleXmlApplicationContext context = new OsgiBundleXmlApplicationContext(new String[] { path }, parent);
String displayName = bundleContext.getBundle().getSymbolicName() + ":" + this.displayName;
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/ReferenceJobFactory.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/ReferenceJobFactory.java
index e4f60fef0..066f6d013 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/ReferenceJobFactory.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/ReferenceJobFactory.java
@@ -41,6 +41,7 @@ public class ReferenceJobFactory implements JobFactory {
*
* @see JobFactory#createJob()
*/
+ @Override
public final Job createJob() {
return job;
}
@@ -50,6 +51,7 @@ public class ReferenceJobFactory implements JobFactory {
*
* @see JobFactory#getJobName()
*/
+ @Override
public String getJobName() {
return job.getName();
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/CoreNamespaceHandler.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/CoreNamespaceHandler.java
index 2ff043353..ba486af05 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/CoreNamespaceHandler.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/CoreNamespaceHandler.java
@@ -29,6 +29,7 @@ public class CoreNamespaceHandler extends NamespaceHandlerSupport {
/**
* @see NamespaceHandler#init()
*/
+ @Override
public void init() {
this.registerBeanDefinitionParser("job", new JobParser());
this.registerBeanDefinitionParser("flow", new TopLevelFlowParser());
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/CoreNamespacePostProcessor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/CoreNamespacePostProcessor.java
index 0fca4ea9b..b3d44f246 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/CoreNamespacePostProcessor.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/CoreNamespacePostProcessor.java
@@ -49,6 +49,7 @@ public class CoreNamespacePostProcessor implements BeanPostProcessor, BeanFactor
private ApplicationContext applicationContext;
+ @Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
for (String beanName : beanFactory.getBeanDefinitionNames()) {
injectJobRepositoryIntoSteps(beanName, beanFactory);
@@ -101,6 +102,7 @@ public class CoreNamespacePostProcessor implements BeanPostProcessor, BeanFactor
}
}
+ @Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
return injectDefaults(bean);
}
@@ -140,10 +142,12 @@ public class CoreNamespacePostProcessor implements BeanPostProcessor, BeanFactor
return bean;
}
+ @Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
return bean;
}
+ @Override
public void setApplicationContext(ApplicationContext applicationContext) {
this.applicationContext = applicationContext;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobExecutionListenerParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobExecutionListenerParser.java
index 899c8f5ee..8da10a252 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobExecutionListenerParser.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobExecutionListenerParser.java
@@ -31,10 +31,12 @@ import org.springframework.batch.core.listener.ListenerMetaData;
*/
public class JobExecutionListenerParser extends AbstractListenerParser {
+ @Override
protected Class extends AbstractListenerFactoryBean> getBeanClass() {
return JobListenerFactoryBean.class;
}
+ @Override
protected ListenerMetaData[] getMetaDataValues() {
return JobListenerMetaData.values();
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobParserJobFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobParserJobFactoryBean.java
index 5e56019e8..07d46cabd 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobParserJobFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/JobParserJobFactoryBean.java
@@ -55,6 +55,7 @@ class JobParserJobFactoryBean implements SmartFactoryBean {
this.name = name;
}
+ @Override
public final Object getObject() throws Exception {
Assert.isTrue(StringUtils.hasText(name), "The job must have an id.");
FlowJob flowJob = new FlowJob(name);
@@ -115,18 +116,22 @@ class JobParserJobFactoryBean implements SmartFactoryBean {
this.flow = flow;
}
+ @Override
public Class getObjectType() {
return FlowJob.class;
}
+ @Override
public boolean isSingleton() {
return true;
}
+ @Override
public boolean isEagerInit() {
return true;
}
+ @Override
public boolean isPrototype() {
return false;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/SimpleFlowFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/SimpleFlowFactoryBean.java
index 73549227b..bc396928f 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/SimpleFlowFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/SimpleFlowFactoryBean.java
@@ -61,10 +61,12 @@ public class SimpleFlowFactoryBean implements FactoryBean, InitializingBean {
*
* @throws Exception
*/
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.hasText(name, "The flow must have a name");
}
+ @Override
public Object getObject() throws Exception {
SimpleFlow flow = new SimpleFlow(name);
@@ -109,10 +111,12 @@ public class SimpleFlowFactoryBean implements FactoryBean, InitializingBean {
return new DelegateState(stateName, state);
}
+ @Override
public Class> getObjectType() {
return SimpleFlow.class;
}
+ @Override
public boolean isSingleton() {
return true;
}
@@ -132,6 +136,7 @@ public class SimpleFlowFactoryBean implements FactoryBean, InitializingBean {
this.state = state;
}
+ @Override
public boolean isEndState() {
return state.isEndState();
}
@@ -141,6 +146,7 @@ public class SimpleFlowFactoryBean implements FactoryBean, InitializingBean {
return state.handle(executor);
}
+ @Override
public Collection getFlows() {
return (state instanceof FlowHolder) ? ((FlowHolder)state).getFlows() : Collections.emptyList();
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepListenerParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepListenerParser.java
index c85bbcc5d..818d8e0eb 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepListenerParser.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepListenerParser.java
@@ -53,10 +53,12 @@ public class StepListenerParser extends AbstractListenerParser {
this.listenerMetaData = listenerMetaData;
}
+ @Override
protected Class extends AbstractListenerFactoryBean> getBeanClass() {
return StepListenerFactoryBean.class;
}
+ @Override
protected ListenerMetaData[] getMetaDataValues() {
return listenerMetaData;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java
index 0012c76bb..dbc9e601f 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java
@@ -220,6 +220,7 @@ class StepParserStepFactoryBean implements FactoryBean, BeanNameAware {
*
* @see FactoryBean#getObject()
*/
+ @Override
public final Object getObject() throws Exception {
if (hasChunkElement) {
Assert.isNull(tasklet, "Step [" + name
@@ -525,10 +526,12 @@ class StepParserStepFactoryBean implements FactoryBean, BeanNameAware {
return n != null && n > 0;
}
+ @Override
public Class getObjectType() {
return TaskletStep.class;
}
+ @Override
public boolean isSingleton() {
return true;
}
@@ -542,6 +545,7 @@ class StepParserStepFactoryBean implements FactoryBean, BeanNameAware {
*
* @see org.springframework.beans.factory.BeanNameAware#setBeanName(java.lang.String)
*/
+ @Override
public void setBeanName(String name) {
if (this.name == null) {
this.name = name;
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/converter/DefaultJobParametersConverter.java b/spring-batch-core/src/main/java/org/springframework/batch/core/converter/DefaultJobParametersConverter.java
index 1b4a73959..444c9729e 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/converter/DefaultJobParametersConverter.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/converter/DefaultJobParametersConverter.java
@@ -83,6 +83,7 @@ public class DefaultJobParametersConverter implements JobParametersConverter {
*
* @see org.springframework.batch.core.converter.JobParametersConverter#getJobParameters(java.util.Properties)
*/
+ @Override
public JobParameters getJobParameters(Properties props) {
if (props == null || props.isEmpty()) {
@@ -153,6 +154,7 @@ public class DefaultJobParametersConverter implements JobParametersConverter {
*
* @see org.springframework.batch.core.converter.JobParametersConverter#getProperties(org.springframework.batch.core.JobParameters)
*/
+ @Override
public Properties getProperties(JobParameters params) {
if (params == null || params.isEmpty()) {
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/AbstractJobExplorerFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/AbstractJobExplorerFactoryBean.java
index 8a1753335..2f097794c 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/AbstractJobExplorerFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/AbstractJobExplorerFactoryBean.java
@@ -56,10 +56,12 @@ public abstract class AbstractJobExplorerFactoryBean implements FactoryBean {
* @return JobExplorer.class
* @see org.springframework.beans.factory.FactoryBean#getObjectType()
*/
+ @Override
public Class getObjectType() {
return JobExplorer.class;
}
+ @Override
public boolean isSingleton() {
return true;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/JobExplorerFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/JobExplorerFactoryBean.java
index c14e305de..8f5a9c097 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/JobExplorerFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/JobExplorerFactoryBean.java
@@ -107,6 +107,7 @@ public class JobExplorerFactoryBean extends AbstractJobExplorerFactoryBean
this.lobHandler = lobHandler;
}
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(dataSource, "DataSource must not be null.");
@@ -168,6 +169,7 @@ public class JobExplorerFactoryBean extends AbstractJobExplorerFactoryBean
return dao;
}
+ @Override
public Object getObject() throws Exception {
return getTarget();
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/MapJobExplorerFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/MapJobExplorerFactoryBean.java
index a8f63dbb1..dc967fa2f 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/MapJobExplorerFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/MapJobExplorerFactoryBean.java
@@ -65,6 +65,7 @@ public class MapJobExplorerFactoryBean extends AbstractJobExplorerFactoryBean im
* @throws Exception
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
*/
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.state(repositoryFactory != null, "A MapJobRepositoryFactoryBean must be provided");
repositoryFactory.afterPropertiesSet();
@@ -90,6 +91,7 @@ public class MapJobExplorerFactoryBean extends AbstractJobExplorerFactoryBean im
return repositoryFactory.getExecutionContextDao();
}
+ @Override
public Object getObject() throws Exception {
return new SimpleJobExplorer(createJobInstanceDao(), createJobExecutionDao(), createStepExecutionDao(),
createExecutionContextDao());
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/SimpleJobExplorer.java b/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/SimpleJobExplorer.java
index bc5924de1..145c76cd3 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/SimpleJobExplorer.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/explore/support/SimpleJobExplorer.java
@@ -73,6 +73,7 @@ public class SimpleJobExplorer implements JobExplorer {
* org.springframework.batch.core.explore.JobExplorer#findJobExecutions(
* org.springframework.batch.core.JobInstance)
*/
+ @Override
public List getJobExecutions(JobInstance jobInstance) {
List executions = jobExecutionDao.findJobExecutions(jobInstance);
for (JobExecution jobExecution : executions) {
@@ -91,6 +92,7 @@ public class SimpleJobExplorer implements JobExplorer {
* org.springframework.batch.core.explore.JobExplorer#findRunningJobExecutions
* (java.lang.String)
*/
+ @Override
public Set findRunningJobExecutions(String jobName) {
Set executions = jobExecutionDao.findRunningJobExecutions(jobName);
for (JobExecution jobExecution : executions) {
@@ -109,6 +111,7 @@ public class SimpleJobExplorer implements JobExplorer {
* org.springframework.batch.core.explore.JobExplorer#getJobExecution(java
* .lang.Long)
*/
+ @Override
public JobExecution getJobExecution(Long executionId) {
if (executionId == null) {
return null;
@@ -131,6 +134,7 @@ public class SimpleJobExplorer implements JobExplorer {
* org.springframework.batch.core.explore.JobExplorer#getStepExecution(java
* .lang.Long)
*/
+ @Override
public StepExecution getStepExecution(Long jobExecutionId, Long executionId) {
JobExecution jobExecution = jobExecutionDao.getJobExecution(jobExecutionId);
if (jobExecution == null) {
@@ -148,6 +152,7 @@ public class SimpleJobExplorer implements JobExplorer {
* org.springframework.batch.core.explore.JobExplorer#getJobInstance(java
* .lang.Long)
*/
+ @Override
public JobInstance getJobInstance(Long instanceId) {
return jobInstanceDao.getJobInstance(instanceId);
}
@@ -159,6 +164,7 @@ public class SimpleJobExplorer implements JobExplorer {
* org.springframework.batch.core.explore.JobExplorer#getLastJobInstances
* (java.lang.String, int)
*/
+ @Override
public List getJobInstances(String jobName, int start, int count) {
return jobInstanceDao.getJobInstances(jobName, start, count);
}
@@ -168,6 +174,7 @@ public class SimpleJobExplorer implements JobExplorer {
*
* @see org.springframework.batch.core.explore.JobExplorer#getJobNames()
*/
+ @Override
public List getJobNames() {
return jobInstanceDao.getJobNames();
}
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 25ffc629b..3a128b801 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
@@ -108,6 +108,7 @@ public abstract class AbstractJob implements Job, StepLocator, BeanNameAware,
*
* @see InitializingBean#afterPropertiesSet()
*/
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(jobRepository, "JobRepository must be set");
}
@@ -121,6 +122,7 @@ public abstract class AbstractJob implements Job, StepLocator, BeanNameAware,
*
* @see org.springframework.beans.factory.BeanNameAware#setBeanName(java.lang.String)
*/
+ @Override
public void setBeanName(String name) {
if (this.name == null) {
this.name = name;
@@ -142,6 +144,7 @@ public abstract class AbstractJob implements Job, StepLocator, BeanNameAware,
*
* @see org.springframework.batch.core.domain.IJob#getName()
*/
+ @Override
public String getName() {
return name;
}
@@ -153,6 +156,7 @@ public abstract class AbstractJob implements Job, StepLocator, BeanNameAware,
* @param stepName
* @return the Step
*/
+ @Override
public abstract Step getStep(String stepName);
/**
@@ -160,8 +164,10 @@ public abstract class AbstractJob implements Job, StepLocator, BeanNameAware,
*
* @return the step names
*/
+ @Override
public abstract Collection getStepNames();
+ @Override
public JobParametersValidator getJobParametersValidator() {
return jobParametersValidator;
}
@@ -180,6 +186,7 @@ public abstract class AbstractJob implements Job, StepLocator, BeanNameAware,
/**
* @see Job#isRestartable()
*/
+ @Override
public boolean isRestartable() {
return restartable;
}
@@ -200,6 +207,7 @@ public abstract class AbstractJob implements Job, StepLocator, BeanNameAware,
*
* @see org.springframework.batch.core.Job#getJobParametersIncrementer()
*/
+ @Override
public JobParametersIncrementer getJobParametersIncrementer() {
return this.jobParametersIncrementer;
}
@@ -273,6 +281,7 @@ public abstract class AbstractJob implements Job, StepLocator, BeanNameAware,
* @throws StartLimitExceededException
* if start limit of one of the steps was exceeded
*/
+ @Override
public final void execute(JobExecution execution) {
logger.debug("Job execution starting: " + execution);
@@ -402,6 +411,7 @@ public abstract class AbstractJob implements Job, StepLocator, BeanNameAware,
jobRepository.update(jobExecution);
}
+ @Override
public String toString() {
return ClassUtils.getShortName(getClass()) + ": [name=" + name + "]";
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/CompositeJobParametersValidator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/CompositeJobParametersValidator.java
index d9a3d006d..601193e69 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/CompositeJobParametersValidator.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/CompositeJobParametersValidator.java
@@ -41,6 +41,7 @@ public class CompositeJobParametersValidator implements JobParametersValidator,
* @param parameters some {@link JobParameters}
* @throws JobParametersInvalidException if the parameters are invalid
*/
+ @Override
public void validate(JobParameters parameters) throws JobParametersInvalidException {
for (JobParametersValidator validator : validators) {
validator.validate(parameters);
@@ -55,6 +56,7 @@ public class CompositeJobParametersValidator implements JobParametersValidator,
this.validators = validators;
}
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(validators, "The 'validators' may not be null");
Assert.notEmpty(validators, "The 'validators' may not be empty");
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/DefaultJobParametersValidator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/DefaultJobParametersValidator.java
index 259a2d472..c66cb43ff 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/DefaultJobParametersValidator.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/DefaultJobParametersValidator.java
@@ -50,6 +50,7 @@ public class DefaultJobParametersValidator implements JobParametersValidator, In
* Check that there are no overlaps between required and optional keys.
* @throws IllegalStateException if there is an overlap
*/
+ @Override
public void afterPropertiesSet() throws IllegalStateException {
for (String key : requiredKeys) {
Assert.state(!optionalKeys.contains(key), "Optional keys canot be required: " + key);
@@ -66,6 +67,7 @@ public class DefaultJobParametersValidator implements JobParametersValidator, In
*
* @throws JobParametersInvalidException if the parameters are not valid
*/
+ @Override
public void validate(JobParameters parameters) throws JobParametersInvalidException {
if (parameters == null) {
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 f9e4363f9..03f37f8c3 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
@@ -72,6 +72,7 @@ public class SimpleJob extends AbstractJob {
*
* @return the step names for this job
*/
+ @Override
public Collection getStepNames() {
List names = new ArrayList();
for (Step step : steps) {
@@ -95,6 +96,7 @@ public class SimpleJob extends AbstractJob {
* @see
* org.springframework.batch.core.job.AbstractJob#getStep(java.lang.String)
*/
+ @Override
public Step getStep(String stepName) {
for (Step step : this.steps) {
if (step.getName().equals(stepName)) {
@@ -113,6 +115,7 @@ public class SimpleJob extends AbstractJob {
*
* @see AbstractJob#handleStep(Step, JobExecution)
*/
+ @Override
protected void doExecute(JobExecution execution) throws JobInterruptedException, JobRestartException,
StartLimitExceededException {
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleStepHandler.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleStepHandler.java
index 33a2e52f7..71dba7d51 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleStepHandler.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/SimpleStepHandler.java
@@ -74,6 +74,7 @@ public class SimpleStepHandler implements StepHandler, InitializingBean {
*
* @see InitializingBean#afterPropertiesSet()
*/
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.state(jobRepository != null, "A JobRepository must be provided");
}
@@ -95,6 +96,7 @@ public class SimpleStepHandler implements StepHandler, InitializingBean {
this.executionContext = executionContext;
}
+ @Override
public StepExecution handleStep(Step step, JobExecution execution) throws JobInterruptedException,
JobRestartException, StartLimitExceededException {
if (execution.isStopping()) {
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/JobFlowBuilder.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/JobFlowBuilder.java
index 55e7ec971..3a6730056 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/JobFlowBuilder.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/builder/JobFlowBuilder.java
@@ -56,6 +56,7 @@ public class JobFlowBuilder extends FlowBuilder {
*
* @see org.springframework.batch.core.job.builder.FlowBuilder#build()
*/
+ @Override
public FlowJobBuilder build() {
Flow flow = flow();
parent.flow(flow);
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecution.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecution.java
index 07dca573a..2b28f9de9 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecution.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecution.java
@@ -57,6 +57,7 @@ public class FlowExecution implements Comparable {
* @param other
* @return negative, zero or positive as per the contract
*/
+ @Override
public int compareTo(FlowExecution other) {
return this.status.compareTo(other.getStatus());
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionStatus.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionStatus.java
index 42a4131c2..776f75905 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionStatus.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionStatus.java
@@ -107,6 +107,7 @@ public class FlowExecutionStatus implements Comparable {
* @param other
* @return negative, zero or positive as per the contract
*/
+ @Override
public int compareTo(FlowExecutionStatus other) {
Status one = Status.match(this.name);
Status two = Status.match(other.name);
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/JobFlowExecutor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/JobFlowExecutor.java
index 6017d086e..af9d10c02 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/JobFlowExecutor.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/JobFlowExecutor.java
@@ -56,6 +56,7 @@ public class JobFlowExecutor implements FlowExecutor {
stepExecutionHolder.set(null);
}
+ @Override
public String executeStep(Step step) throws JobInterruptedException, JobRestartException,
StartLimitExceededException {
StepExecution stepExecution = stepHandler.handleStep(step, execution);
@@ -69,6 +70,7 @@ public class JobFlowExecutor implements FlowExecutor {
return stepExecution.getExitStatus().getExitCode();
}
+ @Override
public void abandonStepExecution() {
StepExecution lastStepExecution = stepExecutionHolder.get();
if (lastStepExecution != null && lastStepExecution.getStatus().isGreaterThan(BatchStatus.STOPPING)) {
@@ -77,24 +79,29 @@ public class JobFlowExecutor implements FlowExecutor {
}
}
+ @Override
public void updateJobExecutionStatus(FlowExecutionStatus status) {
execution.setStatus(findBatchStatus(status));
exitStatus = exitStatus.and(new ExitStatus(status.getName()));
execution.setExitStatus(exitStatus);
}
+ @Override
public JobExecution getJobExecution() {
return execution;
}
+ @Override
public StepExecution getStepExecution() {
return stepExecutionHolder.get();
}
+ @Override
public void close(FlowExecution result) {
stepExecutionHolder.set(null);
}
+ @Override
public boolean isRestart() {
if (getStepExecution() != null && getStepExecution().getStatus() == BatchStatus.ABANDONED) {
/*
@@ -107,6 +114,7 @@ public class JobFlowExecutor implements FlowExecutor {
return execution.getStepExecutions().isEmpty();
}
+ @Override
public void addExitStatus(String code) {
exitStatus = exitStatus.and(new ExitStatus(code));
}
@@ -124,4 +132,4 @@ public class JobFlowExecutor implements FlowExecutor {
return BatchStatus.UNKNOWN;
}
-}
\ No newline at end of file
+}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/SimpleFlow.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/SimpleFlow.java
index e3662dc26..489ec78c6 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/SimpleFlow.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/SimpleFlow.java
@@ -75,6 +75,7 @@ public class SimpleFlow implements Flow, InitializingBean {
*
* @see Flow#getName()
*/
+ @Override
public String getName() {
return name;
}
@@ -92,6 +93,7 @@ public class SimpleFlow implements Flow, InitializingBean {
/**
* {@inheritDoc}
*/
+ @Override
public State getState(String stateName) {
return stateMap.get(stateName);
}
@@ -99,6 +101,7 @@ public class SimpleFlow implements Flow, InitializingBean {
/**
* {@inheritDoc}
*/
+ @Override
public Collection getStates() {
return new HashSet(stateMap.values());
}
@@ -108,6 +111,7 @@ public class SimpleFlow implements Flow, InitializingBean {
*
* @see InitializingBean#afterPropertiesSet()
*/
+ @Override
public void afterPropertiesSet() throws Exception {
initializeTransitions();
}
@@ -115,6 +119,7 @@ public class SimpleFlow implements Flow, InitializingBean {
/**
* @see Flow#start(FlowExecutor)
*/
+ @Override
public FlowExecution start(FlowExecutor executor) throws FlowExecutionException {
if (startState == null) {
initializeTransitions();
@@ -127,6 +132,7 @@ public class SimpleFlow implements Flow, InitializingBean {
/**
* @see Flow#resume(String, FlowExecutor)
*/
+ @Override
public FlowExecution resume(String stateName, FlowExecutor executor) throws FlowExecutionException {
FlowExecutionStatus status = FlowExecutionStatus.UNKNOWN;
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/StateTransition.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/StateTransition.java
index 35c136166..5cbc2e5f7 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/StateTransition.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/StateTransition.java
@@ -165,6 +165,7 @@ public final class StateTransition implements Comparable {
* fo? > foo.
* @see Comparable#compareTo(Object)
*/
+ @Override
public int compareTo(StateTransition other) {
String value = other.pattern;
if (pattern.equals(value)) {
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/AbstractState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/AbstractState.java
index 7104dacb9..560d39128 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/AbstractState.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/AbstractState.java
@@ -35,6 +35,7 @@ public abstract class AbstractState implements State {
this.name = name;
}
+ @Override
public String getName() {
return name;
}
@@ -47,6 +48,7 @@ public abstract class AbstractState implements State {
return getClass().getSimpleName()+": name=["+name+"]";
}
+ @Override
public abstract FlowExecutionStatus handle(FlowExecutor executor) throws Exception;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/DecisionState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/DecisionState.java
index 3265397a8..687a9efaa 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/DecisionState.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/DecisionState.java
@@ -46,8 +46,9 @@ public class DecisionState extends AbstractState {
/* (non-Javadoc)
* @see org.springframework.batch.core.job.flow.State#isEndState()
*/
+ @Override
public boolean isEndState() {
return false;
}
-}
\ No newline at end of file
+}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/EndState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/EndState.java
index 046228a23..7cabbc553 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/EndState.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/EndState.java
@@ -119,6 +119,7 @@ public class EndState extends AbstractState {
*
* @see org.springframework.batch.core.job.flow.State#isEndState()
*/
+ @Override
public boolean isEndState() {
return !status.isStop();
}
@@ -132,4 +133,4 @@ public class EndState extends AbstractState {
public String toString() {
return super.toString() + " status=[" + status + "]";
}
-}
\ No newline at end of file
+}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/FlowState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/FlowState.java
index 1f8f141a4..238ff8ad5 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/FlowState.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/FlowState.java
@@ -45,6 +45,7 @@ public class FlowState extends AbstractState implements FlowHolder {
/**
* @return the flows
*/
+ @Override
public Collection getFlows() {
return Collections.singleton(flow);
}
@@ -57,8 +58,9 @@ public class FlowState extends AbstractState implements FlowHolder {
/* (non-Javadoc)
* @see org.springframework.batch.core.job.flow.State#isEndState()
*/
+ @Override
public boolean isEndState() {
return false;
}
-}
\ No newline at end of file
+}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/MaxValueFlowExecutionAggregator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/MaxValueFlowExecutionAggregator.java
index 718811833..1a25a9be0 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/MaxValueFlowExecutionAggregator.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/MaxValueFlowExecutionAggregator.java
@@ -39,6 +39,7 @@ public class MaxValueFlowExecutionAggregator implements FlowExecutionAggregator
*
* @see FlowExecutionAggregator#aggregate(Collection)
*/
+ @Override
public FlowExecutionStatus aggregate(Collection executions) {
if (executions == null || executions.size() == 0) {
return FlowExecutionStatus.UNKNOWN;
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/SplitState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/SplitState.java
index 887b611a7..459bb9404 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/SplitState.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/SplitState.java
@@ -67,6 +67,7 @@ public class SplitState extends AbstractState implements FlowHolder {
/**
* @return the flows
*/
+ @Override
public Collection getFlows() {
return flows;
}
@@ -87,6 +88,7 @@ public class SplitState extends AbstractState implements FlowHolder {
for (final Flow flow : flows) {
final FutureTask task = new FutureTask(new Callable() {
+ @Override
public FlowExecution call() throws Exception {
return flow.start(executor);
}
@@ -130,6 +132,7 @@ public class SplitState extends AbstractState implements FlowHolder {
*
* @see org.springframework.batch.core.job.flow.State#isEndState()
*/
+ @Override
public boolean isEndState() {
return false;
}
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 f9b0b1a0c..36ce9a334 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
@@ -63,6 +63,7 @@ public class StepState extends AbstractState implements StepHolder {
/**
* @return the step
*/
+ @Override
public Step getStep() {
return step;
}
@@ -70,6 +71,7 @@ public class StepState extends AbstractState implements StepHolder {
/* (non-Javadoc)
* @see org.springframework.batch.core.job.flow.State#isEndState()
*/
+ @Override
public boolean isEndState() {
return false;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/JobRegistryBackgroundJobRunner.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/JobRegistryBackgroundJobRunner.java
index 08b6e5293..dabe77af0 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/JobRegistryBackgroundJobRunner.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/JobRegistryBackgroundJobRunner.java
@@ -202,6 +202,7 @@ public class JobRegistryBackgroundJobRunner {
logger.info("Starting job registry in parent context from XML at: [" + args[0] + "]");
new Thread(new Runnable() {
+ @Override
public void run() {
try {
launcher.run();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/JvmSystemExiter.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/JvmSystemExiter.java
index 4dafcb42f..6d3b6d8d9 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/JvmSystemExiter.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/JvmSystemExiter.java
@@ -34,6 +34,7 @@ public class JvmSystemExiter implements SystemExiter {
*
* @see org.springframework.batch.core.launch.support.SystemExiter#exit(int)
*/
+ @Override
public void exit(int status) {
System.exit(status);
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/RunIdIncrementer.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/RunIdIncrementer.java
index 6bea1f53d..9a0d8f82d 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/RunIdIncrementer.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/RunIdIncrementer.java
@@ -40,6 +40,7 @@ public class RunIdIncrementer implements JobParametersIncrementer {
/**
* Increment the run.id parameter (starting with 1).
*/
+ @Override
public JobParameters getNext(JobParameters parameters) {
JobParameters params = (parameters == null) ? new JobParameters() : parameters;
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/RuntimeExceptionTranslator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/RuntimeExceptionTranslator.java
index 1321a2217..352e43946 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/RuntimeExceptionTranslator.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/RuntimeExceptionTranslator.java
@@ -27,6 +27,7 @@ public class RuntimeExceptionTranslator implements MethodInterceptor {
/* (non-Javadoc)
* @see org.aopalliance.intercept.MethodInterceptor#invoke(org.aopalliance.intercept.MethodInvocation)
*/
+ @Override
public Object invoke(MethodInvocation invocation) throws Throwable {
try {
return invocation.proceed();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/ScheduledJobParametersFactory.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/ScheduledJobParametersFactory.java
index eadc1c40f..ee2fa4e7a 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/ScheduledJobParametersFactory.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/ScheduledJobParametersFactory.java
@@ -43,6 +43,7 @@ public class ScheduledJobParametersFactory implements JobParametersConverter {
*
* @see org.springframework.batch.core.runtime.JobParametersFactory#getJobParameters(java.util.Properties)
*/
+ @Override
public JobParameters getJobParameters(Properties props) {
if (props == null || props.isEmpty()) {
@@ -73,6 +74,7 @@ public class ScheduledJobParametersFactory implements JobParametersConverter {
*
* @see org.springframework.batch.core.converter.JobParametersConverter#getProperties(org.springframework.batch.core.JobParameters)
*/
+ @Override
public Properties getProperties(JobParameters params) {
if (params == null || params.isEmpty()) {
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java
index 44fddf184..64e43a03d 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java
@@ -83,6 +83,7 @@ public class SimpleJobLauncher implements JobLauncher, InitializingBean {
* completed successfully
* @throws JobParametersInvalidException
*/
+ @Override
public JobExecution run(final Job job, final JobParameters jobParameters)
throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException,
JobParametersInvalidException {
@@ -113,6 +114,7 @@ public class SimpleJobLauncher implements JobLauncher, InitializingBean {
try {
taskExecutor.execute(new Runnable() {
+ @Override
public void run() {
try {
logger.info("Job: [" + job + "] launched with the following parameters: [" + jobParameters
@@ -173,6 +175,7 @@ public class SimpleJobLauncher implements JobLauncher, InitializingBean {
* Ensure the required dependencies of a {@link JobRepository} have been
* set.
*/
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.state(jobRepository != null, "A JobRepository has not been set.");
if (taskExecutor == null) {
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobOperator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobOperator.java
index 0556879b0..75db5bb7e 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobOperator.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobOperator.java
@@ -98,6 +98,7 @@ public class SimpleJobOperator implements JobOperator, InitializingBean {
*
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet()
*/
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(jobLauncher, "JobLauncher must be provided");
Assert.notNull(jobRegistry, "JobLocator must be provided");
@@ -146,6 +147,7 @@ public class SimpleJobOperator implements JobOperator, InitializingBean {
*
* @see org.springframework.batch.core.launch.JobOperator#getExecutions(java.lang.Long)
*/
+ @Override
public List getExecutions(long instanceId) throws NoSuchJobInstanceException {
JobInstance jobInstance = jobExplorer.getJobInstance(instanceId);
if (jobInstance == null) {
@@ -163,6 +165,7 @@ public class SimpleJobOperator implements JobOperator, InitializingBean {
*
* @see org.springframework.batch.core.launch.JobOperator#getJobNames()
*/
+ @Override
public Set getJobNames() {
return new TreeSet(jobRegistry.getJobNames());
}
@@ -172,6 +175,7 @@ public class SimpleJobOperator implements JobOperator, InitializingBean {
*
* @see JobOperator#getLastInstances(String, int, int)
*/
+ @Override
public List getJobInstances(String jobName, int start, int count) throws NoSuchJobException {
List list = new ArrayList();
for (JobInstance jobInstance : jobExplorer.getJobInstances(jobName, start, count)) {
@@ -190,6 +194,7 @@ public class SimpleJobOperator implements JobOperator, InitializingBean {
* org.springframework.batch.core.launch.JobOperator#getParameters(java.
* lang.Long)
*/
+ @Override
public String getParameters(long executionId) throws NoSuchJobExecutionException {
JobExecution jobExecution = findExecutionById(executionId);
@@ -204,6 +209,7 @@ public class SimpleJobOperator implements JobOperator, InitializingBean {
* org.springframework.batch.core.launch.JobOperator#getRunningExecutions
* (java.lang.String)
*/
+ @Override
public Set getRunningExecutions(String jobName) throws NoSuchJobException {
Set set = new LinkedHashSet();
for (JobExecution jobExecution : jobExplorer.findRunningJobExecutions(jobName)) {
@@ -222,6 +228,7 @@ public class SimpleJobOperator implements JobOperator, InitializingBean {
* org.springframework.batch.core.launch.JobOperator#getStepExecutionSummaries
* (java.lang.Long)
*/
+ @Override
public Map getStepExecutionSummaries(long executionId) throws NoSuchJobExecutionException {
JobExecution jobExecution = findExecutionById(executionId);
@@ -239,6 +246,7 @@ public class SimpleJobOperator implements JobOperator, InitializingBean {
* org.springframework.batch.core.launch.JobOperator#getSummary(java.lang
* .Long)
*/
+ @Override
public String getSummary(long executionId) throws NoSuchJobExecutionException {
JobExecution jobExecution = findExecutionById(executionId);
return jobExecution.toString();
@@ -250,6 +258,7 @@ public class SimpleJobOperator implements JobOperator, InitializingBean {
* @see
* org.springframework.batch.core.launch.JobOperator#resume(java.lang.Long)
*/
+ @Override
public Long restart(long executionId) throws JobInstanceAlreadyCompleteException, NoSuchJobExecutionException, NoSuchJobException, JobRestartException, JobParametersInvalidException {
logger.info("Checking status of job execution with id=" + executionId);
@@ -278,6 +287,7 @@ public class SimpleJobOperator implements JobOperator, InitializingBean {
* org.springframework.batch.core.launch.JobOperator#start(java.lang.String,
* java.lang.String)
*/
+ @Override
public Long start(String jobName, String parameters) throws NoSuchJobException, JobInstanceAlreadyExistsException, JobParametersInvalidException {
logger.info("Checking status of job with name=" + jobName);
@@ -317,6 +327,7 @@ public class SimpleJobOperator implements JobOperator, InitializingBean {
*
* @see JobOperator#startNextInstance(String )
*/
+ @Override
public Long startNextInstance(String jobName) throws NoSuchJobException, JobParametersNotFoundException,
UnexpectedJobExecutionException, JobParametersInvalidException {
@@ -366,6 +377,7 @@ public class SimpleJobOperator implements JobOperator, InitializingBean {
* @see
* org.springframework.batch.core.launch.JobOperator#stop(java.lang.Long)
*/
+ @Override
@Transactional
public boolean stop(long executionId) throws NoSuchJobExecutionException, JobExecutionNotRunningException {
@@ -383,6 +395,7 @@ public class SimpleJobOperator implements JobOperator, InitializingBean {
return true;
}
+ @Override
public JobExecution abandon(long jobExecutionId) throws NoSuchJobExecutionException, JobExecutionAlreadyRunningException {
JobExecution jobExecution = findExecutionById(jobExecutionId);
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJvmExitCodeMapper.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJvmExitCodeMapper.java
index 43002b512..a8337f362 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJvmExitCodeMapper.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJvmExitCodeMapper.java
@@ -67,6 +67,7 @@ public class SimpleJvmExitCodeMapper implements ExitCodeMapper {
* Framework
* @return The exitCode of the Batch Job as known by the JVM
*/
+ @Override
public int intValue(String exitCode) {
Integer statusCode = null;
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 3bd6bb8c1..de6f06211 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
@@ -68,6 +68,7 @@ public abstract class AbstractListenerFactoryBean implements FactoryBean, Initia
private Map metaDataMap;
+ @Override
public Object getObject() {
if (metaDataMap == null) {
@@ -174,6 +175,7 @@ public abstract class AbstractListenerFactoryBean implements FactoryBean, Initia
}
}
+ @Override
public boolean isSingleton() {
return true;
}
@@ -186,6 +188,7 @@ public abstract class AbstractListenerFactoryBean implements FactoryBean, Initia
this.metaDataMap = metaDataMap;
}
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(delegate, "Delegate must not be null");
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ChunkListenerSupport.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ChunkListenerSupport.java
index 06635cebb..5e9e55724 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ChunkListenerSupport.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ChunkListenerSupport.java
@@ -28,12 +28,14 @@ public class ChunkListenerSupport implements ChunkListener {
/* (non-Javadoc)
* @see org.springframework.batch.core.domain.ChunkListener#afterChunk()
*/
+ @Override
public void afterChunk() {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.domain.ChunkListener#beforeChunk()
*/
+ @Override
public void beforeChunk() {
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeChunkListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeChunkListener.java
index 98c411972..a8b81b1a7 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeChunkListener.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeChunkListener.java
@@ -53,6 +53,7 @@ public class CompositeChunkListener implements ChunkListener {
*
* @see org.springframework.batch.core.ChunkListener#afterChunk()
*/
+ @Override
public void afterChunk() {
for (Iterator iterator = listeners.iterator(); iterator.hasNext();) {
ChunkListener listener = iterator.next();
@@ -65,6 +66,7 @@ public class CompositeChunkListener implements ChunkListener {
*
* @see org.springframework.batch.core.ChunkListener#beforeChunk()
*/
+ @Override
public void beforeChunk() {
for (Iterator iterator = listeners.reverse(); iterator.hasNext();) {
ChunkListener listener = iterator.next();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemProcessListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemProcessListener.java
index a0b05dec1..deee4280d 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemProcessListener.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemProcessListener.java
@@ -53,6 +53,7 @@ public class CompositeItemProcessListener implements ItemProcessListener> iterator = listeners.reverse(); iterator.hasNext();) {
ItemProcessListener super T, ? super S> listener = iterator.next();
@@ -65,6 +66,7 @@ public class CompositeItemProcessListener implements ItemProcessListener> iterator = listeners.iterator(); iterator.hasNext();) {
ItemProcessListener super T, ? super S> listener = iterator.next();
@@ -78,6 +80,7 @@ public class CompositeItemProcessListener implements ItemProcessListener> iterator = listeners.reverse(); iterator.hasNext();) {
ItemProcessListener super T, ? super S> listener = iterator.next();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemReadListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemReadListener.java
index e1841d1aa..428edf496 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemReadListener.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemReadListener.java
@@ -53,6 +53,7 @@ public class CompositeItemReadListener implements ItemReadListener {
* prioritising those that implement {@link Ordered}.
* @see org.springframework.batch.core.ItemReadListener#afterRead(java.lang.Object)
*/
+ @Override
public void afterRead(T item) {
for (Iterator> iterator = listeners.reverse(); iterator.hasNext();) {
ItemReadListener super T> listener = iterator.next();
@@ -65,6 +66,7 @@ public class CompositeItemReadListener implements ItemReadListener {
* that implement {@link Ordered}.
* @see org.springframework.batch.core.ItemReadListener#beforeRead()
*/
+ @Override
public void beforeRead() {
for (Iterator> iterator = listeners.iterator(); iterator.hasNext();) {
ItemReadListener super T> listener = iterator.next();
@@ -77,6 +79,7 @@ public class CompositeItemReadListener implements ItemReadListener {
* prioritising those that implement {@link Ordered}.
* @see org.springframework.batch.core.ItemReadListener#onReadError(java.lang.Exception)
*/
+ @Override
public void onReadError(Exception ex) {
for (Iterator> iterator = listeners.iterator(); iterator.hasNext();) {
ItemReadListener super T> listener = iterator.next();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemWriteListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemWriteListener.java
index 9aae1476b..c3d32f17c 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemWriteListener.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemWriteListener.java
@@ -53,6 +53,7 @@ public class CompositeItemWriteListener implements ItemWriteListener {
* prioritising those that implement {@link Ordered}.
* @see ItemWriteListener#afterWrite(java.util.List)
*/
+ @Override
public void afterWrite(List extends S> items) {
for (Iterator> iterator = listeners.reverse(); iterator.hasNext();) {
ItemWriteListener super S> listener = iterator.next();
@@ -65,6 +66,7 @@ public class CompositeItemWriteListener implements ItemWriteListener {
* that implement {@link Ordered}.
* @see ItemWriteListener#beforeWrite(List)
*/
+ @Override
public void beforeWrite(List extends S> items) {
for (Iterator> iterator = listeners.iterator(); iterator.hasNext();) {
ItemWriteListener super S> listener = iterator.next();
@@ -77,6 +79,7 @@ public class CompositeItemWriteListener implements ItemWriteListener {
* prioritising those that implement {@link Ordered}.
* @see ItemWriteListener#onWriteError(Exception, List)
*/
+ @Override
public void onWriteError(Exception ex, List extends S> items) {
for (Iterator> iterator = listeners.reverse(); iterator.hasNext();) {
ItemWriteListener super S> listener = iterator.next();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeJobExecutionListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeJobExecutionListener.java
index 7506b3689..579a63f7d 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeJobExecutionListener.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeJobExecutionListener.java
@@ -53,6 +53,7 @@ public class CompositeJobExecutionListener implements JobExecutionListener {
* prioritising those that implement {@link Ordered}.
* @see org.springframework.batch.core.JobExecutionListener#afterJob(org.springframework.batch.core.JobExecution)
*/
+ @Override
public void afterJob(JobExecution jobExecution) {
for (Iterator iterator = listeners.reverse(); iterator.hasNext();) {
JobExecutionListener listener = iterator.next();
@@ -65,6 +66,7 @@ public class CompositeJobExecutionListener implements JobExecutionListener {
* that implement {@link Ordered}.
* @see org.springframework.batch.core.JobExecutionListener#beforeJob(org.springframework.batch.core.JobExecution)
*/
+ @Override
public void beforeJob(JobExecution jobExecution) {
for (Iterator iterator = listeners.iterator(); iterator.hasNext();) {
JobExecutionListener listener = iterator.next();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeSkipListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeSkipListener.java
index 9db7313be..7b99d9cdd 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeSkipListener.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeSkipListener.java
@@ -52,6 +52,7 @@ public class CompositeSkipListener implements SkipListener {
* that implement {@link Ordered}.
* @see org.springframework.batch.core.SkipListener#onSkipInRead(java.lang.Throwable)
*/
+ @Override
public void onSkipInRead(Throwable t) {
for (Iterator> iterator = listeners.iterator(); iterator.hasNext();) {
SkipListener super T,? super S> listener = iterator.next();
@@ -65,6 +66,7 @@ public class CompositeSkipListener implements SkipListener {
* @see org.springframework.batch.core.SkipListener#onSkipInWrite(java.lang.Object,
* java.lang.Throwable)
*/
+ @Override
public void onSkipInWrite(S item, Throwable t) {
for (Iterator> iterator = listeners.iterator(); iterator.hasNext();) {
SkipListener super T,? super S> listener = iterator.next();
@@ -78,6 +80,7 @@ public class CompositeSkipListener implements SkipListener {
* @see org.springframework.batch.core.SkipListener#onSkipInWrite(java.lang.Object,
* java.lang.Throwable)
*/
+ @Override
public void onSkipInProcess(T item, Throwable t) {
for (Iterator> iterator = listeners.iterator(); iterator.hasNext();) {
SkipListener super T,? super S> listener = iterator.next();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeStepExecutionListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeStepExecutionListener.java
index 2c9dc6428..12343bfd6 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeStepExecutionListener.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeStepExecutionListener.java
@@ -55,6 +55,7 @@ public class CompositeStepExecutionListener implements StepExecutionListener {
* prioritising those that implement {@link Ordered}.
* @see org.springframework.batch.core.StepExecutionListener#afterStep(StepExecution)
*/
+ @Override
public ExitStatus afterStep(StepExecution stepExecution) {
ExitStatus status = null;
for (Iterator iterator = list.reverse(); iterator.hasNext();) {
@@ -70,6 +71,7 @@ public class CompositeStepExecutionListener implements StepExecutionListener {
* that implement {@link Ordered}.
* @see org.springframework.batch.core.StepExecutionListener#beforeStep(StepExecution)
*/
+ @Override
public void beforeStep(StepExecution stepExecution) {
for (Iterator iterator = list.iterator(); iterator.hasNext();) {
StepExecutionListener listener = iterator.next();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ExecutionContextPromotionListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ExecutionContextPromotionListener.java
index b5e322d91..6b5cbb6e7 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ExecutionContextPromotionListener.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ExecutionContextPromotionListener.java
@@ -46,6 +46,7 @@ public class ExecutionContextPromotionListener extends StepExecutionListenerSupp
private boolean strict = false;
+ @Override
public ExitStatus afterStep(StepExecution stepExecution) {
ExecutionContext stepContext = stepExecution.getExecutionContext();
ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();
@@ -69,6 +70,7 @@ public class ExecutionContextPromotionListener extends StepExecutionListenerSupp
return null;
}
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(this.keys, "The 'keys' property must be provided");
Assert.notEmpty(this.keys, "The 'keys' property must not be empty");
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ItemListenerSupport.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ItemListenerSupport.java
index 5402580ed..c0a2da608 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ItemListenerSupport.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ItemListenerSupport.java
@@ -37,6 +37,7 @@ public class ItemListenerSupport implements ItemReadListener, ItemProce
*
* @see org.springframework.batch.core.domain.ItemReadListener#afterRead(java.lang.Object)
*/
+ @Override
public void afterRead(I item) {
}
@@ -45,6 +46,7 @@ public class ItemListenerSupport implements ItemReadListener, ItemProce
*
* @see org.springframework.batch.core.domain.ItemReadListener#beforeRead()
*/
+ @Override
public void beforeRead() {
}
@@ -53,6 +55,7 @@ public class ItemListenerSupport implements ItemReadListener, ItemProce
*
* @see org.springframework.batch.core.domain.ItemReadListener#onReadError(java.lang.Exception)
*/
+ @Override
public void onReadError(Exception ex) {
}
@@ -62,6 +65,7 @@ public class ItemListenerSupport implements ItemReadListener, ItemProce
* @see org.springframework.batch.core.ItemProcessListener#afterProcess(java.lang.Object,
* java.lang.Object)
*/
+ @Override
public void afterProcess(I item, O result) {
}
@@ -70,6 +74,7 @@ public class ItemListenerSupport implements ItemReadListener, ItemProce
*
* @see org.springframework.batch.core.ItemProcessListener#beforeProcess(java.lang.Object)
*/
+ @Override
public void beforeProcess(I item) {
}
@@ -79,6 +84,7 @@ public class ItemListenerSupport implements ItemReadListener, ItemProce
* @see org.springframework.batch.core.ItemProcessListener#onProcessError(java.lang.Object,
* java.lang.Exception)
*/
+ @Override
public void onProcessError(I item, Exception e) {
}
@@ -87,6 +93,7 @@ public class ItemListenerSupport implements ItemReadListener, ItemProce
*
* @see org.springframework.batch.core.domain.ItemWriteListener#afterWrite()
*/
+ @Override
public void afterWrite(List extends O> item) {
}
@@ -95,6 +102,7 @@ public class ItemListenerSupport implements ItemReadListener, ItemProce
*
* @see org.springframework.batch.core.domain.ItemWriteListener#beforeWrite(java.lang.Object)
*/
+ @Override
public void beforeWrite(List extends O> item) {
}
@@ -104,6 +112,7 @@ public class ItemListenerSupport implements ItemReadListener, ItemProce
* @see org.springframework.batch.core.domain.ItemWriteListener#onWriteError(java.lang.Exception,
* java.lang.Object)
*/
+ @Override
public void onWriteError(Exception ex, List extends O> item) {
}
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobExecutionListenerSupport.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobExecutionListenerSupport.java
index 9f793c5f2..2e9d5239f 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobExecutionListenerSupport.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobExecutionListenerSupport.java
@@ -27,12 +27,14 @@ public class JobExecutionListenerSupport implements JobExecutionListener {
/* (non-Javadoc)
* @see org.springframework.batch.core.domain.JobListener#afterJob()
*/
+ @Override
public void afterJob(JobExecution jobExecution) {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.domain.JobListener#beforeJob(org.springframework.batch.core.domain.JobExecution)
*/
+ @Override
public void beforeJob(JobExecution jobExecution) {
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobListenerFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobListenerFactoryBean.java
index 1294477f7..e97f718da 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobListenerFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobListenerFactoryBean.java
@@ -29,18 +29,22 @@ import org.springframework.batch.core.JobExecutionListener;
*/
public class JobListenerFactoryBean extends AbstractListenerFactoryBean {
+ @Override
protected ListenerMetaData getMetaDataFromPropertyName(String propertyName) {
return JobListenerMetaData.fromPropertyName(propertyName);
}
+ @Override
protected ListenerMetaData[] getMetaDataValues() {
return JobListenerMetaData.values();
}
+ @Override
protected Class> getDefaultListenerClass() {
return JobExecutionListener.class;
}
+ @Override
public Class> getObjectType() {
return JobExecutionListener.class;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobListenerMetaData.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobListenerMetaData.java
index 078faccf1..78404a1d8 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobListenerMetaData.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/JobListenerMetaData.java
@@ -56,22 +56,27 @@ public enum JobListenerMetaData implements ListenerMetaData {
}
}
+ @Override
public String getMethodName() {
return methodName;
}
+ @Override
public Class extends Annotation> getAnnotation() {
return annotation;
}
+ @Override
public Class> getListenerInterface() {
return JobExecutionListener.class;
}
+ @Override
public String getPropertyName() {
return propertyName;
}
+ @Override
public Class>[] getParamTypes() {
return new Class>[]{ JobExecution.class };
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/MethodInvokerMethodInterceptor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/MethodInvokerMethodInterceptor.java
index 7d8d39b9d..993f5bb9b 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/MethodInvokerMethodInterceptor.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/MethodInvokerMethodInterceptor.java
@@ -51,6 +51,7 @@ public class MethodInvokerMethodInterceptor implements MethodInterceptor {
this.invokerMap = invokerMap;
}
+ @Override
public Object invoke(MethodInvocation invocation) throws Throwable {
String methodName = invocation.getMethod().getName();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/MulticasterBatchListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/MulticasterBatchListener.java
index f77a2f0d2..bebc48d5b 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/MulticasterBatchListener.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/MulticasterBatchListener.java
@@ -106,6 +106,7 @@ public class MulticasterBatchListener implements StepExecutionListener, Ch
* @see org.springframework.batch.core.listener.CompositeItemProcessListener#afterProcess(java.lang.Object,
* java.lang.Object)
*/
+ @Override
public void afterProcess(T item, S result) {
try {
itemProcessListener.afterProcess(item, result);
@@ -119,6 +120,7 @@ public class MulticasterBatchListener implements StepExecutionListener, Ch
* @param item
* @see org.springframework.batch.core.listener.CompositeItemProcessListener#beforeProcess(java.lang.Object)
*/
+ @Override
public void beforeProcess(T item) {
try {
itemProcessListener.beforeProcess(item);
@@ -134,6 +136,7 @@ public class MulticasterBatchListener implements StepExecutionListener, Ch
* @see org.springframework.batch.core.listener.CompositeItemProcessListener#onProcessError(java.lang.Object,
* java.lang.Exception)
*/
+ @Override
public void onProcessError(T item, Exception ex) {
try {
itemProcessListener.onProcessError(item, ex);
@@ -146,6 +149,7 @@ public class MulticasterBatchListener implements StepExecutionListener, Ch
/**
* @see org.springframework.batch.core.listener.CompositeStepExecutionListener#afterStep(StepExecution)
*/
+ @Override
public ExitStatus afterStep(StepExecution stepExecution) {
try {
return stepListener.afterStep(stepExecution);
@@ -159,6 +163,7 @@ public class MulticasterBatchListener implements StepExecutionListener, Ch
* @param stepExecution
* @see org.springframework.batch.core.listener.CompositeStepExecutionListener#beforeStep(org.springframework.batch.core.StepExecution)
*/
+ @Override
public void beforeStep(StepExecution stepExecution) {
try {
stepListener.beforeStep(stepExecution);
@@ -172,6 +177,7 @@ public class MulticasterBatchListener implements StepExecutionListener, Ch
*
* @see org.springframework.batch.core.listener.CompositeChunkListener#afterChunk()
*/
+ @Override
public void afterChunk() {
try {
chunkListener.afterChunk();
@@ -185,6 +191,7 @@ public class MulticasterBatchListener implements StepExecutionListener, Ch
*
* @see org.springframework.batch.core.listener.CompositeChunkListener#beforeChunk()
*/
+ @Override
public void beforeChunk() {
try {
chunkListener.beforeChunk();
@@ -198,6 +205,7 @@ public class MulticasterBatchListener implements StepExecutionListener, Ch
* @param item
* @see org.springframework.batch.core.listener.CompositeItemReadListener#afterRead(java.lang.Object)
*/
+ @Override
public void afterRead(T item) {
try {
itemReadListener.afterRead(item);
@@ -211,6 +219,7 @@ public class MulticasterBatchListener implements StepExecutionListener, Ch
*
* @see org.springframework.batch.core.listener.CompositeItemReadListener#beforeRead()
*/
+ @Override
public void beforeRead() {
try {
itemReadListener.beforeRead();
@@ -224,6 +233,7 @@ public class MulticasterBatchListener implements StepExecutionListener, Ch
* @param ex
* @see org.springframework.batch.core.listener.CompositeItemReadListener#onReadError(java.lang.Exception)
*/
+ @Override
public void onReadError(Exception ex) {
try {
itemReadListener.onReadError(ex);
@@ -237,6 +247,7 @@ public class MulticasterBatchListener implements StepExecutionListener, Ch
*
* @see ItemWriteListener#afterWrite(List)
*/
+ @Override
public void afterWrite(List extends S> items) {
try {
itemWriteListener.afterWrite(items);
@@ -250,6 +261,7 @@ public class MulticasterBatchListener implements StepExecutionListener, Ch
* @param items
* @see ItemWriteListener#beforeWrite(List)
*/
+ @Override
public void beforeWrite(List extends S> items) {
try {
itemWriteListener.beforeWrite(items);
@@ -264,6 +276,7 @@ public class MulticasterBatchListener implements StepExecutionListener, Ch
* @param items
* @see ItemWriteListener#onWriteError(Exception, List)
*/
+ @Override
public void onWriteError(Exception ex, List extends S> items) {
try {
itemWriteListener.onWriteError(ex, items);
@@ -277,6 +290,7 @@ public class MulticasterBatchListener implements StepExecutionListener, Ch
* @param t
* @see org.springframework.batch.core.listener.CompositeSkipListener#onSkipInRead(java.lang.Throwable)
*/
+ @Override
public void onSkipInRead(Throwable t) {
skipListener.onSkipInRead(t);
}
@@ -287,6 +301,7 @@ public class MulticasterBatchListener implements StepExecutionListener, Ch
* @see org.springframework.batch.core.listener.CompositeSkipListener#onSkipInWrite(java.lang.Object,
* java.lang.Throwable)
*/
+ @Override
public void onSkipInWrite(S item, Throwable t) {
skipListener.onSkipInWrite(item, t);
}
@@ -297,6 +312,7 @@ public class MulticasterBatchListener implements StepExecutionListener, Ch
* @see org.springframework.batch.core.listener.CompositeSkipListener#onSkipInProcess(Object,
* Throwable)
*/
+ @Override
public void onSkipInProcess(T item, Throwable t) {
skipListener.onSkipInProcess(item, t);
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/SkipListenerSupport.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/SkipListenerSupport.java
index 3ae689ee6..185c96b73 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/SkipListenerSupport.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/SkipListenerSupport.java
@@ -28,19 +28,22 @@ public class SkipListenerSupport implements SkipListener {
/* (non-Javadoc)
* @see org.springframework.batch.core.SkipListener#onSkipInRead(java.lang.Throwable)
*/
+ @Override
public void onSkipInRead(Throwable t) {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.SkipListener#onSkipInWrite(java.lang.Object, java.lang.Throwable)
*/
+ @Override
public void onSkipInWrite(S item, Throwable t) {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.SkipListener#onSkipInProcess(java.lang.Object, java.lang.Throwable)
*/
- public void onSkipInProcess(T item, Throwable t) {
+ @Override
+ public void onSkipInProcess(T item, Throwable t) {
}
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepExecutionListenerSupport.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepExecutionListenerSupport.java
index 224dd7039..d22d2511c 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepExecutionListenerSupport.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepExecutionListenerSupport.java
@@ -28,6 +28,7 @@ public class StepExecutionListenerSupport implements StepExecutionListener {
/* (non-Javadoc)
* @see org.springframework.batch.core.domain.StepListener#afterStep(StepExecution stepExecution)
*/
+ @Override
public ExitStatus afterStep(StepExecution stepExecution) {
return null;
}
@@ -35,6 +36,7 @@ public class StepExecutionListenerSupport implements StepExecutionListener {
/* (non-Javadoc)
* @see org.springframework.batch.core.domain.StepListener#open(org.springframework.batch.item.ExecutionContext)
*/
+ @Override
public void beforeStep(StepExecution stepExecution) {
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerFactoryBean.java
index 24500d6d3..1dc526c65 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerFactoryBean.java
@@ -29,18 +29,22 @@ import org.springframework.batch.core.StepListener;
*/
public class StepListenerFactoryBean extends AbstractListenerFactoryBean {
+ @Override
protected ListenerMetaData getMetaDataFromPropertyName(String propertyName) {
return StepListenerMetaData.fromPropertyName(propertyName);
}
+ @Override
protected ListenerMetaData[] getMetaDataValues() {
return StepListenerMetaData.values();
}
+ @Override
protected Class> getDefaultListenerClass() {
return StepListener.class;
}
+ @Override
@SuppressWarnings("rawtypes")
public Class getObjectType() {
return StepListener.class;
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerMetaData.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerMetaData.java
index 753d7d21f..21d2fc035 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerMetaData.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerMetaData.java
@@ -94,22 +94,27 @@ public enum StepListenerMetaData implements ListenerMetaData {
}
}
+ @Override
public String getMethodName() {
return methodName;
}
+ @Override
public Class extends Annotation> getAnnotation() {
return annotation;
}
+ @Override
public Class> getListenerInterface() {
return listenerInterface;
}
+ @Override
public Class>[] getParamTypes() {
return paramTypes;
}
+ @Override
public String getPropertyName() {
return propertyName;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerSupport.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerSupport.java
index 956c1a108..c415cca34 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerSupport.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerSupport.java
@@ -39,6 +39,7 @@ public class StepListenerSupport implements StepExecutionListener, ChunkLis
/* (non-Javadoc)
* @see org.springframework.batch.core.StepExecutionListener#afterStep(org.springframework.batch.core.StepExecution)
*/
+ @Override
public ExitStatus afterStep(StepExecution stepExecution) {
return null;
}
@@ -46,90 +47,105 @@ public class StepListenerSupport implements StepExecutionListener, ChunkLis
/* (non-Javadoc)
* @see org.springframework.batch.core.StepExecutionListener#beforeStep(org.springframework.batch.core.StepExecution)
*/
+ @Override
public void beforeStep(StepExecution stepExecution) {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.domain.ChunkListener#afterChunk()
*/
+ @Override
public void afterChunk() {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.domain.ChunkListener#beforeChunk()
*/
+ @Override
public void beforeChunk() {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.domain.ItemReadListener#afterRead(java.lang.Object)
*/
+ @Override
public void afterRead(T item) {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.domain.ItemReadListener#beforeRead()
*/
+ @Override
public void beforeRead() {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.domain.ItemReadListener#onReadError(java.lang.Exception)
*/
+ @Override
public void onReadError(Exception ex) {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.ItemWriteListener#afterWrite(java.util.List)
*/
+ @Override
public void afterWrite(List extends S> items) {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.ItemWriteListener#beforeWrite(java.util.List)
*/
+ @Override
public void beforeWrite(List extends S> items) {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.ItemWriteListener#onWriteError(java.lang.Exception, java.util.List)
*/
+ @Override
public void onWriteError(Exception exception, List extends S> items) {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.ItemProcessListener#afterProcess(java.lang.Object, java.lang.Object)
*/
+ @Override
public void afterProcess(T item, S result) {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.ItemProcessListener#beforeProcess(java.lang.Object)
*/
+ @Override
public void beforeProcess(T item) {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.ItemProcessListener#onProcessError(java.lang.Object, java.lang.Exception)
*/
+ @Override
public void onProcessError(T item, Exception e) {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.SkipListener#onSkipInProcess(java.lang.Object, java.lang.Throwable)
*/
+ @Override
public void onSkipInProcess(T item, Throwable t) {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.SkipListener#onSkipInRead(java.lang.Throwable)
*/
+ @Override
public void onSkipInRead(Throwable t) {
}
/* (non-Javadoc)
* @see org.springframework.batch.core.SkipListener#onSkipInWrite(java.lang.Object, java.lang.Throwable)
*/
+ @Override
public void onSkipInWrite(S item, Throwable t) {
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/AbstractPartitionHandler.java b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/AbstractPartitionHandler.java
index f745d6ea0..27cd42668 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/AbstractPartitionHandler.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/AbstractPartitionHandler.java
@@ -53,6 +53,7 @@ public abstract class AbstractPartitionHandler implements PartitionHandler {
/**
* @see PartitionHandler#handle(StepExecutionSplitter, StepExecution)
*/
+ @Override
public Collection handle(final StepExecutionSplitter stepSplitter,
final StepExecution masterStepExecution) throws Exception {
final Set stepExecutions = stepSplitter.split(masterStepExecution, gridSize);
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/DefaultStepExecutionAggregator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/DefaultStepExecutionAggregator.java
index b03dcbc90..467545d9b 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/DefaultStepExecutionAggregator.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/DefaultStepExecutionAggregator.java
@@ -43,6 +43,7 @@ public class DefaultStepExecutionAggregator implements StepExecutionAggregator {
*
* @see StepExecutionAggregator #aggregate(StepExecution, Collection)
*/
+ @Override
public void aggregate(StepExecution result, Collection executions) {
Assert.notNull(result, "To aggregate into a result it must be non-null.");
if (executions == null) {
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/MultiResourcePartitioner.java b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/MultiResourcePartitioner.java
index 244ad16c8..91ee19a23 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/MultiResourcePartitioner.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/MultiResourcePartitioner.java
@@ -68,6 +68,7 @@ public class MultiResourcePartitioner implements Partitioner {
*
* @see Partitioner#partition(int)
*/
+ @Override
public Map partition(int gridSize) {
Map map = new HashMap(gridSize);
int i = 0;
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/PartitionStep.java b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/PartitionStep.java
index 0e5105b3c..04ddf492f 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/PartitionStep.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/PartitionStep.java
@@ -78,6 +78,7 @@ public class PartitionStep extends AbstractStep {
*
* @see AbstractStep#afterPropertiesSet()
*/
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(stepExecutionSplitter, "StepExecutionSplitter must be provided");
Assert.notNull(partitionHandler, "PartitionHandler must be provided");
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/RemoteStepExecutionAggregator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/RemoteStepExecutionAggregator.java
index 109a93acf..cff7d490d 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/RemoteStepExecutionAggregator.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/RemoteStepExecutionAggregator.java
@@ -72,6 +72,7 @@ public class RemoteStepExecutionAggregator implements StepExecutionAggregator, I
/**
* @throws Exception if the job explorer is not provided
*/
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.state(jobExplorer != null, "A JobExplorer must be provided");
}
@@ -83,6 +84,7 @@ public class RemoteStepExecutionAggregator implements StepExecutionAggregator, I
*
* @see StepExecutionAggregator #aggregate(StepExecution, Collection)
*/
+ @Override
public void aggregate(StepExecution result, Collection executions) {
Assert.notNull(result, "To aggregate into a result it must be non-null.");
if (executions == null) {
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/SimplePartitioner.java b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/SimplePartitioner.java
index 4f383902a..dbcd46359 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/SimplePartitioner.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/SimplePartitioner.java
@@ -34,6 +34,7 @@ public class SimplePartitioner implements Partitioner {
private static final String PARTITION_KEY = "partition";
+ @Override
public Map partition(int gridSize) {
Map map = new HashMap(gridSize);
for (int i = 0; i < gridSize; i++) {
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/SimpleStepExecutionSplitter.java b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/SimpleStepExecutionSplitter.java
index e6848a28d..4967a2445 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/SimpleStepExecutionSplitter.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/SimpleStepExecutionSplitter.java
@@ -108,6 +108,7 @@ public class SimpleStepExecutionSplitter implements StepExecutionSplitter, Initi
*
* @see InitializingBean#afterPropertiesSet()
*/
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.state(jobRepository != null, "A JobRepository is required");
Assert.state(stepName != null, "A step name is required");
@@ -160,6 +161,7 @@ public class SimpleStepExecutionSplitter implements StepExecutionSplitter, Initi
/**
* @see StepExecutionSplitter#getStepName()
*/
+ @Override
public String getStepName() {
return this.stepName;
}
@@ -167,6 +169,7 @@ public class SimpleStepExecutionSplitter implements StepExecutionSplitter, Initi
/**
* @see StepExecutionSplitter#split(StepExecution, int)
*/
+ @Override
public Set split(StepExecution stepExecution, int gridSize) throws JobExecutionException {
JobExecution jobExecution = stepExecution.getJobExecution();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/TaskExecutorPartitionHandler.java b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/TaskExecutorPartitionHandler.java
index be486025e..f382c3864 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/TaskExecutorPartitionHandler.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/partition/support/TaskExecutorPartitionHandler.java
@@ -53,6 +53,7 @@ public class TaskExecutorPartitionHandler extends AbstractPartitionHandler imple
private Step step;
+ @Override
public void afterPropertiesSet() throws Exception {
}
@@ -84,6 +85,7 @@ public class TaskExecutorPartitionHandler extends AbstractPartitionHandler imple
* @return the step instance that will be used
* @see StepHolder#getStep()
*/
+ @Override
public Step getStep() {
return this.step;
}
@@ -132,6 +134,7 @@ public class TaskExecutorPartitionHandler extends AbstractPartitionHandler imple
protected FutureTask createTask(final Step step,
final StepExecution stepExecution) {
return new FutureTask(new Callable() {
+ @Override
public StepExecution call() throws Exception {
step.execute(stepExecution);
return stepExecution;
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/AbstractJdbcBatchMetadataDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/AbstractJdbcBatchMetadataDao.java
index 1fb8cf3ef..1c648ba06 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/AbstractJdbcBatchMetadataDao.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/AbstractJdbcBatchMetadataDao.java
@@ -79,6 +79,7 @@ public abstract class AbstractJdbcBatchMetadataDao implements InitializingBean {
this.clobTypeToUse = clobTypeToUse;
}
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(jdbcTemplate);
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/DefaultExecutionContextSerializer.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/DefaultExecutionContextSerializer.java
index 52c2eb9a7..3533613e6 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/DefaultExecutionContextSerializer.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/DefaultExecutionContextSerializer.java
@@ -34,6 +34,7 @@ public class DefaultExecutionContextSerializer implements ExecutionContextSerial
* @param context
* @param out
*/
+ @Override
@SuppressWarnings("unchecked")
public void serialize(Object context, OutputStream out) throws IOException {
Assert.notNull(context);
@@ -48,6 +49,7 @@ public class DefaultExecutionContextSerializer implements ExecutionContextSerial
* @param inputStream
* @return the object serialized in the provided {@link InputStream}
*/
+ @Override
public Object deserialize(InputStream inputStream) throws IOException {
return deserializer.deserialize(inputStream);
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcExecutionContextDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcExecutionContextDao.java
index 85856462d..0b09db54f 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcExecutionContextDao.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcExecutionContextDao.java
@@ -100,6 +100,7 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem
this.shortContextLength = shortContextLength;
}
+ @Override
public ExecutionContext getExecutionContext(JobExecution jobExecution) {
Long executionId = jobExecution.getId();
Assert.notNull(executionId, "ExecutionId must not be null.");
@@ -114,6 +115,7 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem
}
}
+ @Override
public ExecutionContext getExecutionContext(StepExecution stepExecution) {
Long executionId = stepExecution.getId();
Assert.notNull(executionId, "ExecutionId must not be null.");
@@ -128,6 +130,7 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem
}
}
+ @Override
public void updateExecutionContext(final JobExecution jobExecution) {
Long executionId = jobExecution.getId();
ExecutionContext executionContext = jobExecution.getExecutionContext();
@@ -139,6 +142,7 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem
persistSerializedContext(executionId, serializedContext, UPDATE_JOB_EXECUTION_CONTEXT);
}
+ @Override
public void updateExecutionContext(final StepExecution stepExecution) {
Long executionId = stepExecution.getId();
@@ -151,6 +155,7 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem
persistSerializedContext(executionId, serializedContext, UPDATE_STEP_EXECUTION_CONTEXT);
}
+ @Override
public void saveExecutionContext(JobExecution jobExecution) {
Long executionId = jobExecution.getId();
@@ -163,6 +168,7 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem
persistSerializedContext(executionId, serializedContext, INSERT_JOB_EXECUTION_CONTEXT);
}
+ @Override
public void saveExecutionContext(StepExecution stepExecution) {
Long executionId = stepExecution.getId();
ExecutionContext executionContext = stepExecution.getExecutionContext();
@@ -204,6 +210,7 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem
}
getJdbcTemplate().update(getQuery(sql), new PreparedStatementSetter() {
+ @Override
public void setValues(PreparedStatement ps) throws SQLException {
ps.setString(1, shortContext);
if (longContext != null) {
@@ -240,6 +247,7 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem
@SuppressWarnings("unchecked")
private class ExecutionContextRowMapper implements ParameterizedRowMapper {
+ @Override
public ExecutionContext mapRow(ResultSet rs, int i) throws SQLException {
ExecutionContext executionContext = new ExecutionContext();
String serializedContext = rs.getString("SERIALIZED_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 31e7f68c2..cf9c7b21c 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
@@ -102,11 +102,13 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements
this.jobExecutionIncrementer = jobExecutionIncrementer;
}
+ @Override
public void afterPropertiesSet() throws Exception {
super.afterPropertiesSet();
Assert.notNull(jobExecutionIncrementer, "The jobExecutionIncrementer must not be null.");
}
+ @Override
public List findJobExecutions(final JobInstance job) {
Assert.notNull(job, "Job cannot be null.");
@@ -125,6 +127,7 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements
* @throws IllegalArgumentException if jobExecution is null, as well as any
* of it's fields to be persisted.
*/
+ @Override
public void saveJobExecution(JobExecution jobExecution) {
validateJobExecution(jobExecution);
@@ -166,6 +169,7 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements
*
* @see JobExecutionDao#updateJobExecution(JobExecution)
*/
+ @Override
public void updateJobExecution(JobExecution jobExecution) {
validateJobExecution(jobExecution);
@@ -217,6 +221,7 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements
}
}
+ @Override
public JobExecution getLastJobExecution(JobInstance jobInstance) {
Long id = jobInstance.getId();
@@ -240,6 +245,7 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements
* @seeorg.springframework.batch.core.repository.dao.JobExecutionDao#
* getLastJobExecution(java.lang.String)
*/
+ @Override
public JobExecution getJobExecution(Long executionId) {
try {
JobExecution jobExecution = getJdbcTemplate().queryForObject(getQuery(GET_EXECUTION_BY_ID),
@@ -257,10 +263,12 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements
* @seeorg.springframework.batch.core.repository.dao.JobExecutionDao#
* findRunningJobExecutions(java.lang.String)
*/
+ @Override
public Set findRunningJobExecutions(String jobName) {
final Set result = new HashSet();
RowCallbackHandler handler = new RowCallbackHandler() {
+ @Override
public void processRow(ResultSet rs) throws SQLException {
JobExecutionRowMapper mapper = new JobExecutionRowMapper();
result.add(mapper.mapRow(rs, 0));
@@ -271,6 +279,7 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements
return result;
}
+ @Override
public void synchronizeStatus(JobExecution jobExecution) {
int currentVersion = getJdbcTemplate().queryForInt(getQuery(CURRENT_VERSION_JOB_EXECUTION),
jobExecution.getId());
@@ -299,6 +308,7 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements
this.jobInstance = jobInstance;
}
+ @Override
public JobExecution mapRow(ResultSet rs, int rowNum) throws SQLException {
Long id = rs.getLong(1);
JobExecution jobExecution;
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 089bbf053..f5c11f01c 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
@@ -98,6 +98,7 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements
* @throws IllegalArgumentException
* if any {@link JobParameters} fields are null.
*/
+ @Override
public JobInstance createJobInstance(String jobName,
JobParameters jobParameters) {
@@ -206,6 +207,7 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements
* @throws IllegalArgumentException
* if any {@link JobParameters} fields are null.
*/
+ @Override
public JobInstance getJobInstance(final String jobName,
final JobParameters jobParameters) {
@@ -242,6 +244,7 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements
* org.springframework.batch.core.repository.dao.JobInstanceDao#getJobInstance
* (java.lang.Long)
*/
+ @Override
public JobInstance getJobInstance(Long instanceId) {
try {
@@ -260,6 +263,7 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements
private JobParameters getJobParameters(Long instanceId) {
final Map map = new HashMap();
RowCallbackHandler handler = new RowCallbackHandler() {
+ @Override
public void processRow(ResultSet rs) throws SQLException {
ParameterType type = ParameterType.valueOf(rs.getString(3));
JobParameter value = null;
@@ -287,9 +291,11 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements
* org.springframework.batch.core.repository.dao.JobInstanceDao#getJobNames
* ()
*/
+ @Override
public List getJobNames() {
return getJdbcTemplate().query(getQuery(FIND_JOB_NAMES),
new ParameterizedRowMapper() {
+ @Override
public String mapRow(ResultSet rs, int rowNum)
throws SQLException {
return rs.getString(1);
@@ -303,6 +309,7 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements
* @seeorg.springframework.batch.core.repository.dao.JobInstanceDao#
* getLastJobInstances(java.lang.String, int)
*/
+ @Override
public List getJobInstances(String jobName, final int start,
final int count) {
@@ -310,6 +317,7 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements
private List list = new ArrayList();
+ @Override
public Object extractData(ResultSet rs) throws SQLException,
DataAccessException {
int rowNum = 0;
@@ -340,6 +348,7 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements
* org.springframework.batch.core.repository.dao.JobInstanceDao#getJobInstance
* (org.springframework.batch.core.JobExecution)
*/
+ @Override
public JobInstance getJobInstance(JobExecution jobExecution) {
try {
@@ -362,6 +371,7 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements
this.jobIncrementer = jobIncrementer;
}
+ @Override
public void afterPropertiesSet() throws Exception {
super.afterPropertiesSet();
Assert.notNull(jobIncrementer);
@@ -383,6 +393,7 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements
this.jobParameters = jobParameters;
}
+ @Override
public JobInstance mapRow(ResultSet rs, int rowNum) throws SQLException {
Long id = rs.getLong(1);
if (jobParameters == null) {
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 3f7275e4b..dc014a923 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
@@ -91,6 +91,7 @@ public class JdbcStepExecutionDao extends AbstractJdbcBatchMetadataDao implement
this.stepExecutionIncrementer = stepExecutionIncrementer;
}
+ @Override
public void afterPropertiesSet() throws Exception {
super.afterPropertiesSet();
Assert.notNull(stepExecutionIncrementer, "StepExecutionIncrementer cannot be null.");
@@ -103,6 +104,7 @@ public class JdbcStepExecutionDao extends AbstractJdbcBatchMetadataDao implement
*
* @see StepExecutionDao#saveStepExecution(StepExecution)
*/
+ @Override
public void saveStepExecution(StepExecution stepExecution) {
Assert.isNull(stepExecution.getId(),
@@ -145,6 +147,7 @@ public class JdbcStepExecutionDao extends AbstractJdbcBatchMetadataDao implement
Assert.notNull(stepExecution.getStatus(), "StepExecution status cannot be null.");
}
+ @Override
public void updateStepExecution(StepExecution stepExecution) {
validateStepExecution(stepExecution);
@@ -206,6 +209,7 @@ public class JdbcStepExecutionDao extends AbstractJdbcBatchMetadataDao implement
}
}
+ @Override
public StepExecution getStepExecution(JobExecution jobExecution, Long stepExecutionId) {
List executions = getJdbcTemplate().query(getQuery(GET_STEP_EXECUTION),
new StepExecutionRowMapper(jobExecution), jobExecution.getId(), stepExecutionId);
@@ -220,6 +224,7 @@ public class JdbcStepExecutionDao extends AbstractJdbcBatchMetadataDao implement
}
}
+ @Override
public void addStepExecutions(JobExecution jobExecution) {
getJdbcTemplate().query(getQuery(GET_STEP_EXECUTIONS), new StepExecutionRowMapper(jobExecution),
jobExecution.getId());
@@ -233,6 +238,7 @@ public class JdbcStepExecutionDao extends AbstractJdbcBatchMetadataDao implement
this.jobExecution = jobExecution;
}
+ @Override
public StepExecution mapRow(ResultSet rs, int rowNum) throws SQLException {
StepExecution stepExecution = new StepExecution(rs.getString(2), jobExecution, rs.getLong(1));
stepExecution.setStartTime(rs.getTimestamp(3));
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapExecutionContextDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapExecutionContextDao.java
index 880dd21cc..8585cce2d 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapExecutionContextDao.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapExecutionContextDao.java
@@ -49,6 +49,7 @@ public class MapExecutionContextDao implements ExecutionContextDao {
this.id = id;
}
+ @Override
public int compareTo(ContextKey them) {
if(them == null) return 1;
final int idCompare = new Long(this.id).compareTo(new Long(them.id)); // JDK6 Make this Long.compare(x,y)
@@ -93,10 +94,12 @@ public class MapExecutionContextDao implements ExecutionContextDao {
return (ExecutionContext) SerializationUtils.deserialize(SerializationUtils.serialize(original));
}
+ @Override
public ExecutionContext getExecutionContext(StepExecution stepExecution) {
return copy(contexts.get(ContextKey.step(stepExecution.getId())));
}
+ @Override
public void updateExecutionContext(StepExecution stepExecution) {
ExecutionContext executionContext = stepExecution.getExecutionContext();
if (executionContext != null) {
@@ -104,10 +107,12 @@ public class MapExecutionContextDao implements ExecutionContextDao {
}
}
+ @Override
public ExecutionContext getExecutionContext(JobExecution jobExecution) {
return copy(contexts.get(ContextKey.job(jobExecution.getId())));
}
+ @Override
public void updateExecutionContext(JobExecution jobExecution) {
ExecutionContext executionContext = jobExecution.getExecutionContext();
if (executionContext != null) {
@@ -115,10 +120,12 @@ public class MapExecutionContextDao implements ExecutionContextDao {
}
}
+ @Override
public void saveExecutionContext(JobExecution jobExecution) {
updateExecutionContext(jobExecution);
}
+ @Override
public void saveExecutionContext(StepExecution stepExecution) {
updateExecutionContext(stepExecution);
}
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 ca8da5215..d50302061 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,6 +53,7 @@ public class MapJobExecutionDao implements JobExecutionDao {
return copy;
}
+ @Override
public void saveJobExecution(JobExecution jobExecution) {
Assert.isTrue(jobExecution.getId() == null);
Long newId = currentId.getAndIncrement();
@@ -61,6 +62,7 @@ public class MapJobExecutionDao implements JobExecutionDao {
executionsById.put(newId, copy(jobExecution));
}
+ @Override
public List findJobExecutions(JobInstance jobInstance) {
List executions = new ArrayList();
for (JobExecution exec : executionsById.values()) {
@@ -70,6 +72,7 @@ public class MapJobExecutionDao implements JobExecutionDao {
}
Collections.sort(executions, new Comparator() {
+ @Override
public int compare(JobExecution e1, JobExecution e2) {
long result = (e1.getId() - e2.getId());
if (result > 0) {
@@ -86,6 +89,7 @@ public class MapJobExecutionDao implements JobExecutionDao {
return executions;
}
+ @Override
public void updateJobExecution(JobExecution jobExecution) {
Long id = jobExecution.getId();
Assert.notNull(id, "JobExecution is expected to have an id (should be saved already)");
@@ -103,6 +107,7 @@ public class MapJobExecutionDao implements JobExecutionDao {
}
}
+ @Override
public JobExecution getLastJobExecution(JobInstance jobInstance) {
JobExecution lastExec = null;
for (JobExecution exec : executionsById.values()) {
@@ -125,6 +130,7 @@ public class MapJobExecutionDao implements JobExecutionDao {
* @seeorg.springframework.batch.core.repository.dao.JobExecutionDao#
* findRunningJobExecutions(java.lang.String)
*/
+ @Override
public Set findRunningJobExecutions(String jobName) {
Set result = new HashSet();
for (JobExecution exec : executionsById.values()) {
@@ -143,10 +149,12 @@ public class MapJobExecutionDao implements JobExecutionDao {
* org.springframework.batch.core.repository.dao.JobExecutionDao#getJobExecution
* (java.lang.Long)
*/
+ @Override
public JobExecution getJobExecution(Long executionId) {
return copy(executionsById.get(executionId));
}
+ @Override
public void synchronizeStatus(JobExecution jobExecution) {
JobExecution saved = getJobExecution(jobExecution.getId());
if (saved.getVersion().intValue() != jobExecution.getVersion().intValue()) {
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapJobInstanceDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapJobInstanceDao.java
index 68ade2582..7c6b2da9c 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapJobInstanceDao.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/MapJobInstanceDao.java
@@ -45,6 +45,7 @@ public class MapJobInstanceDao implements JobInstanceDao {
jobInstances.clear();
}
+ @Override
public JobInstance createJobInstance(String jobName, JobParameters jobParameters) {
Assert.state(getJobInstance(jobName, jobParameters) == null, "JobInstance must not already exist");
@@ -56,6 +57,7 @@ public class MapJobInstanceDao implements JobInstanceDao {
return jobInstance;
}
+ @Override
public JobInstance getJobInstance(String jobName, JobParameters jobParameters) {
for (JobInstance instance : jobInstances) {
@@ -67,6 +69,7 @@ public class MapJobInstanceDao implements JobInstanceDao {
}
+ @Override
public JobInstance getJobInstance(Long instanceId) {
for (JobInstance instance : jobInstances) {
if (instance.getId().equals(instanceId)) {
@@ -76,6 +79,7 @@ public class MapJobInstanceDao implements JobInstanceDao {
return null;
}
+ @Override
public List getJobNames() {
List result = new ArrayList();
for (JobInstance instance : jobInstances) {
@@ -85,6 +89,7 @@ public class MapJobInstanceDao implements JobInstanceDao {
return result;
}
+ @Override
public List getJobInstances(String jobName, int start, int count) {
List result = new ArrayList();
for (JobInstance instance : jobInstances) {
@@ -94,6 +99,7 @@ public class MapJobInstanceDao implements JobInstanceDao {
}
Collections.sort(result, new Comparator() {
// sort by ID descending
+ @Override
public int compare(JobInstance o1, JobInstance o2) {
return Long.signum(o2.getId() - o1.getId());
}
@@ -104,6 +110,7 @@ public class MapJobInstanceDao implements JobInstanceDao {
return result.subList(startIndex, endIndex);
}
+ @Override
public JobInstance getJobInstance(JobExecution jobExecution) {
return jobExecution.getJobInstance();
}
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 2752059d4..e7e8e4095 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
@@ -56,6 +56,7 @@ public class MapStepExecutionDao implements StepExecutionDao {
// Cheaper than full serialization is a reflective field copy, which is
// fine for volatile storage
ReflectionUtils.doWithFields(StepExecution.class, new ReflectionUtils.FieldCallback() {
+ @Override
public void doWith(Field field) throws IllegalArgumentException, IllegalAccessException {
field.setAccessible(true);
field.set(targetExecution, field.get(sourceExecution));
@@ -63,6 +64,7 @@ public class MapStepExecutionDao implements StepExecutionDao {
});
}
+ @Override
public void saveStepExecution(StepExecution stepExecution) {
Assert.isTrue(stepExecution.getId() == null);
@@ -83,6 +85,7 @@ public class MapStepExecutionDao implements StepExecutionDao {
}
+ @Override
public void updateStepExecution(StepExecution stepExecution) {
Assert.notNull(stepExecution.getJobExecutionId());
@@ -108,10 +111,12 @@ public class MapStepExecutionDao implements StepExecutionDao {
}
}
+ @Override
public StepExecution getStepExecution(JobExecution jobExecution, Long stepExecutionId) {
return executionsByStepExecutionId.get(stepExecutionId);
}
+ @Override
public void addStepExecutions(JobExecution jobExecution) {
Map executions = executionsByJobExecutionId.get(jobExecution.getId());
if (executions == null || executions.isEmpty()) {
@@ -120,6 +125,7 @@ public class MapStepExecutionDao implements StepExecutionDao {
List result = new ArrayList(executions.values());
Collections.sort(result, new Comparator() {
+ @Override
public int compare(Entity o1, Entity o2) {
return Long.signum(o2.getId() - o1.getId());
}
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 b0be6a559..951b6f8c5 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
@@ -57,6 +57,7 @@ public class XStreamExecutionContextStringSerializer implements ExecutionContext
this.hierarchicalStreamDriver = hierarchicalStreamDriver;
}
+ @Override
public void afterPropertiesSet() throws Exception {
init();
}
@@ -80,6 +81,7 @@ public class XStreamExecutionContextStringSerializer implements ExecutionContext
* @param out
* @see Serializer#serialize(Object, OutputStream)
*/
+ @Override
public void serialize(Object context, OutputStream out) throws IOException {
Assert.notNull(context);
Assert.notNull(out);
@@ -94,6 +96,7 @@ public class XStreamExecutionContextStringSerializer implements ExecutionContext
* @return a reconstructed execution context
* @see Deserializer#deserialize(InputStream)
*/
+ @Override
@SuppressWarnings("unchecked")
public Object deserialize(InputStream in) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(in));
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/AbstractJobRepositoryFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/AbstractJobRepositoryFactoryBean.java
index db4f6ead0..dbfdcaf77 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/AbstractJobRepositoryFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/AbstractJobRepositoryFactoryBean.java
@@ -87,10 +87,12 @@ public abstract class AbstractJobRepositoryFactoryBean implements FactoryBean, I
* @return JobRepository.class
* @see org.springframework.beans.factory.FactoryBean#getObjectType()
*/
+ @Override
public Class getObjectType() {
return JobRepository.class;
}
+ @Override
public boolean isSingleton() {
return true;
}
@@ -159,6 +161,7 @@ public abstract class AbstractJobRepositoryFactoryBean implements FactoryBean, I
+ isolationLevelForCreate + "\n*=PROPAGATION_REQUIRED"));
if (validateTransactionState) {
DefaultPointcutAdvisor advisor = new DefaultPointcutAdvisor(new MethodInterceptor() {
+ @Override
public Object invoke(MethodInvocation invocation) throws Throwable {
if (TransactionSynchronizationManager.isActualTransactionActive()) {
throw new IllegalStateException(
@@ -180,6 +183,7 @@ public abstract class AbstractJobRepositoryFactoryBean implements FactoryBean, I
}
}
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(transactionManager, "TransactionManager must not be null.");
@@ -191,6 +195,7 @@ public abstract class AbstractJobRepositoryFactoryBean implements FactoryBean, I
createExecutionContextDao());
}
+ @Override
public Object getObject() throws Exception {
if (proxyFactory == null) {
afterPropertiesSet();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/SimpleJobRepository.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/SimpleJobRepository.java
index 5aa9a9976..1b8ddfe91 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/SimpleJobRepository.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/support/SimpleJobRepository.java
@@ -83,10 +83,12 @@ public class SimpleJobRepository implements JobRepository {
this.ecDao = ecDao;
}
+ @Override
public boolean isJobInstanceExists(String jobName, JobParameters jobParameters) {
return jobInstanceDao.getJobInstance(jobName, jobParameters) != null;
}
+ @Override
public JobExecution createJobExecution(String jobName, JobParameters jobParameters)
throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException {
@@ -145,6 +147,7 @@ public class SimpleJobRepository implements JobRepository {
}
+ @Override
public void update(JobExecution jobExecution) {
Assert.notNull(jobExecution, "JobExecution cannot be null.");
@@ -155,6 +158,7 @@ public class SimpleJobRepository implements JobRepository {
jobExecutionDao.updateJobExecution(jobExecution);
}
+ @Override
public void add(StepExecution stepExecution) {
validateStepExecution(stepExecution);
@@ -163,6 +167,7 @@ public class SimpleJobRepository implements JobRepository {
ecDao.saveExecutionContext(stepExecution);
}
+ @Override
public void update(StepExecution stepExecution) {
validateStepExecution(stepExecution);
Assert.notNull(stepExecution.getId(), "StepExecution must already be saved (have an id assigned)");
@@ -178,16 +183,19 @@ public class SimpleJobRepository implements JobRepository {
Assert.notNull(stepExecution.getJobExecutionId(), "StepExecution must belong to persisted JobExecution");
}
+ @Override
public void updateExecutionContext(StepExecution stepExecution) {
validateStepExecution(stepExecution);
Assert.notNull(stepExecution.getId(), "StepExecution must already be saved (have an id assigned)");
ecDao.updateExecutionContext(stepExecution);
}
+ @Override
public void updateExecutionContext(JobExecution jobExecution) {
ecDao.updateExecutionContext(jobExecution);
}
+ @Override
public StepExecution getLastStepExecution(JobInstance jobInstance, String stepName) {
List jobExecutions = jobExecutionDao.findJobExecutions(jobInstance);
List stepExecutions = new ArrayList(jobExecutions.size());
@@ -218,6 +226,7 @@ public class SimpleJobRepository implements JobRepository {
/**
* @return number of executions of the step within given job instance
*/
+ @Override
public int getStepExecutionCount(JobInstance jobInstance, String stepName) {
int count = 0;
List jobExecutions = jobExecutionDao.findJobExecutions(jobInstance);
@@ -249,6 +258,7 @@ public class SimpleJobRepository implements JobRepository {
}
}
+ @Override
public JobExecution getLastJobExecution(String jobName, JobParameters jobParameters) {
JobInstance jobInstance = jobInstanceDao.getJobInstance(jobName, jobParameters);
if (jobInstance == null) {
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/resource/ListPreparedStatementSetter.java b/spring-batch-core/src/main/java/org/springframework/batch/core/resource/ListPreparedStatementSetter.java
index 342bc6c0c..e8be8af99 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/resource/ListPreparedStatementSetter.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/resource/ListPreparedStatementSetter.java
@@ -43,6 +43,7 @@ public class ListPreparedStatementSetter implements
private List> parameters;
+ @Override
public void setValues(PreparedStatement ps) throws SQLException {
for (int i = 0; i < parameters.size(); i++) {
StatementCreatorUtils.setParameterValue(ps, i + 1, SqlTypeValue.TYPE_UNKNOWN, parameters.get(i));
@@ -58,6 +59,7 @@ public class ListPreparedStatementSetter implements
this.parameters = parameters;
}
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(parameters, "Parameters must be provided");
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/resource/StepExecutionSimpleCompletionPolicy.java b/spring-batch-core/src/main/java/org/springframework/batch/core/resource/StepExecutionSimpleCompletionPolicy.java
index 3ed303631..391a335ec 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/resource/StepExecutionSimpleCompletionPolicy.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/resource/StepExecutionSimpleCompletionPolicy.java
@@ -71,6 +71,7 @@ public class StepExecutionSimpleCompletionPolicy extends StepExecutionListenerSu
*
* @see org.springframework.batch.core.listener.StepExecutionListenerSupport#beforeStep(org.springframework.batch.core.StepExecution)
*/
+ @Override
public void beforeStep(StepExecution stepExecution) {
JobParameters jobParameters = stepExecution.getJobParameters();
Assert.state(jobParameters.getParameters().containsKey(keyName),
@@ -85,6 +86,7 @@ public class StepExecutionSimpleCompletionPolicy extends StepExecutionListenerSu
* indicates completion
* @see CompletionPolicy#isComplete(RepeatContext, RepeatStatus)
*/
+ @Override
public boolean isComplete(RepeatContext context, RepeatStatus result) {
Assert.state(delegate != null, "The delegate resource has not been initialised. "
+ "Remember to register this object as a StepListener.");
@@ -96,6 +98,7 @@ public class StepExecutionSimpleCompletionPolicy extends StepExecutionListenerSu
* @return if the commit interval has been reached
* @see org.springframework.batch.repeat.CompletionPolicy#isComplete(org.springframework.batch.repeat.RepeatContext)
*/
+ @Override
public boolean isComplete(RepeatContext context) {
Assert.state(delegate != null, "The delegate resource has not been initialised. "
+ "Remember to register this object as a StepListener.");
@@ -107,6 +110,7 @@ public class StepExecutionSimpleCompletionPolicy extends StepExecutionListenerSu
* @return a new {@link RepeatContext}
* @see org.springframework.batch.repeat.CompletionPolicy#start(org.springframework.batch.repeat.RepeatContext)
*/
+ @Override
public RepeatContext start(RepeatContext parent) {
Assert.state(delegate != null, "The delegate resource has not been initialised. "
+ "Remember to register this object as a StepListener.");
@@ -117,6 +121,7 @@ public class StepExecutionSimpleCompletionPolicy extends StepExecutionListenerSu
* @param context
* @see org.springframework.batch.repeat.CompletionPolicy#update(org.springframework.batch.repeat.RepeatContext)
*/
+ @Override
public void update(RepeatContext context) {
Assert.state(delegate != null, "The delegate resource has not been initialised. "
+ "Remember to register this object as a StepListener.");
@@ -127,6 +132,7 @@ public class StepExecutionSimpleCompletionPolicy extends StepExecutionListenerSu
* Delegates to the wrapped {@link CompletionPolicy} if set, otherwise
* returns the value of {@link #setKeyName(String)}.
*/
+ @Override
public String toString() {
return (delegate == null) ? keyName : delegate.toString();
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/StepScope.java b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/StepScope.java
index 0b4cf7c55..fb6ba5aeb 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/StepScope.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/StepScope.java
@@ -91,6 +91,7 @@ public class StepScope implements Scope, BeanFactoryPostProcessor, Ordered {
this.order = order;
}
+ @Override
public int getOrder() {
return order;
}
@@ -124,6 +125,7 @@ public class StepScope implements Scope, BeanFactoryPostProcessor, Ordered {
* step-scoped beans. This method is part of the Scope SPI in Spring 3.0,
* but should just be ignored by earlier versions of Spring.
*/
+ @Override
public Object resolveContextualObject(String key) {
StepContext context = getContext();
// TODO: support for attributes as well maybe (setters not exposed yet
@@ -134,6 +136,7 @@ public class StepScope implements Scope, BeanFactoryPostProcessor, Ordered {
/**
* @see Scope#get(String, ObjectFactory)
*/
+ @Override
public Object get(String name, ObjectFactory objectFactory) {
StepContext context = getContext();
@@ -161,6 +164,7 @@ public class StepScope implements Scope, BeanFactoryPostProcessor, Ordered {
/**
* @see Scope#getConversationId()
*/
+ @Override
public String getConversationId() {
StepContext context = getContext();
return context.getId();
@@ -169,6 +173,7 @@ public class StepScope implements Scope, BeanFactoryPostProcessor, Ordered {
/**
* @see Scope#registerDestructionCallback(String, Runnable)
*/
+ @Override
public void registerDestructionCallback(String name, Runnable callback) {
StepContext context = getContext();
logger.debug(String.format("Registered destruction callback in scope=%s, name=%s", this.name, name));
@@ -178,6 +183,7 @@ public class StepScope implements Scope, BeanFactoryPostProcessor, Ordered {
/**
* @see Scope#remove(String)
*/
+ @Override
public Object remove(String name) {
StepContext context = getContext();
logger.debug(String.format("Removing from scope=%s, name=%s", this.name, name));
@@ -207,6 +213,7 @@ public class StepScope implements Scope, BeanFactoryPostProcessor, Ordered {
* @param beanFactory the BeanFactory to register with
* @throws BeansException if there is a problem.
*/
+ @Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
beanFactory.registerScope(name, this);
@@ -307,6 +314,7 @@ public class StepScope implements Scope, BeanFactoryPostProcessor, Ordered {
public Scopifier(BeanDefinitionRegistry registry, String scope, boolean proxyTargetClass, boolean scoped) {
super(new StringValueResolver() {
+ @Override
public String resolveStringValue(String value) {
return value;
}
@@ -374,6 +382,7 @@ public class StepScope implements Scope, BeanFactoryPostProcessor, Ordered {
private ExpressionHider(String scope, final boolean scoped) {
super(new StringValueResolver() {
+ @Override
public String resolveStringValue(String value) {
if (scoped && value.contains(PLACEHOLDER_PREFIX) && value.contains(PLACEHOLDER_SUFFIX)) {
value = value.replace(PLACEHOLDER_PREFIX, REPLACEMENT_PREFIX);
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/context/StepContextRepeatCallback.java b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/context/StepContextRepeatCallback.java
index 558cc945e..69e7ea273 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/context/StepContextRepeatCallback.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/context/StepContextRepeatCallback.java
@@ -59,6 +59,7 @@ public abstract class StepContextRepeatCallback implements RepeatCallback {
*
* @see RepeatCallback#doInIteration(RepeatContext)
*/
+ @Override
public RepeatStatus doInIteration(RepeatContext context) throws Exception {
// The StepContext has to be the same for all chunks,
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/util/PlaceholderProxyFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/util/PlaceholderProxyFactoryBean.java
index c76821dd2..4b58e1b43 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/util/PlaceholderProxyFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/util/PlaceholderProxyFactoryBean.java
@@ -74,6 +74,7 @@ public class PlaceholderProxyFactoryBean extends ProxyConfig implements FactoryB
this.scopedTargetSource.setTargetBeanName(targetBeanName);
}
+ @Override
public void setBeanFactory(BeanFactory beanFactory) {
if (!(beanFactory instanceof ConfigurableBeanFactory)) {
throw new IllegalStateException("Not running in a ConfigurableBeanFactory: " + beanFactory);
@@ -110,6 +111,7 @@ public class PlaceholderProxyFactoryBean extends ProxyConfig implements FactoryB
this.proxy = pf.getProxy(cbf.getBeanClassLoader());
}
+ @Override
public Object getObject() {
if (this.proxy == null) {
throw new FactoryBeanNotInitializedException();
@@ -117,6 +119,7 @@ public class PlaceholderProxyFactoryBean extends ProxyConfig implements FactoryB
return this.proxy;
}
+ @Override
public Class> getObjectType() {
if (this.proxy != null) {
return this.proxy.getClass();
@@ -127,6 +130,7 @@ public class PlaceholderProxyFactoryBean extends ProxyConfig implements FactoryB
return null;
}
+ @Override
public boolean isSingleton() {
return true;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/util/StepContextFactory.java b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/util/StepContextFactory.java
index 664a9c6f3..e388c0ac0 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/util/StepContextFactory.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/util/StepContextFactory.java
@@ -28,10 +28,12 @@ import org.springframework.batch.core.scope.context.StepSynchronizationManager;
*/
public class StepContextFactory implements ContextFactory {
+ @Override
public Object getContext() {
return StepSynchronizationManager.getContext();
}
+ @Override
public String getContextId() {
StepContext context = StepSynchronizationManager.getContext();
return context!=null ? (String) context.getId() : "sysinit";
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 79e78e189..bfe1a1d7f 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
@@ -67,11 +67,13 @@ public abstract class AbstractStep implements Step, InitializingBean, BeanNameAw
super();
}
+ @Override
public void afterPropertiesSet() throws Exception {
Assert.state(name != null, "A Step must have a name");
Assert.state(jobRepository != null, "JobRepository is mandatory");
}
+ @Override
public String getName() {
return this.name;
}
@@ -92,12 +94,14 @@ public abstract class AbstractStep implements Step, InitializingBean, BeanNameAw
*
* @see org.springframework.beans.factory.BeanNameAware#setBeanName(java.lang.String)
*/
+ @Override
public void setBeanName(String name) {
if (this.name == null) {
this.name = name;
}
}
+ @Override
public int getStartLimit() {
return this.startLimit;
}
@@ -111,6 +115,7 @@ public abstract class AbstractStep implements Step, InitializingBean, BeanNameAw
this.startLimit = startLimit;
}
+ @Override
public boolean isAllowStartIfComplete() {
return this.allowStartIfComplete;
}
@@ -168,6 +173,7 @@ public abstract class AbstractStep implements Step, InitializingBean, BeanNameAw
* {@link #open(ExecutionContext)}), execution logic ({@link #doExecute(StepExecution)}) and resource closing (
* {@link #close(ExecutionContext)}).
*/
+ @Override
public final void execute(StepExecution stepExecution) throws JobInterruptedException,
UnexpectedJobExecutionException {
@@ -320,6 +326,7 @@ public abstract class AbstractStep implements Step, InitializingBean, BeanNameAw
return jobRepository;
}
+ @Override
public String toString() {
return ClassUtils.getShortName(getClass()) + ": [name=" + name + "]";
}
@@ -346,4 +353,4 @@ public abstract class AbstractStep implements Step, InitializingBean, BeanNameAw
return exitStatus;
}
-}
\ No newline at end of file
+}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/NoWorkFoundStepExecutionListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/NoWorkFoundStepExecutionListener.java
index 9739b0884..63182b3d7 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/NoWorkFoundStepExecutionListener.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/NoWorkFoundStepExecutionListener.java
@@ -27,6 +27,7 @@ import org.springframework.batch.core.listener.StepExecutionListenerSupport;
*/
public class NoWorkFoundStepExecutionListener extends StepExecutionListenerSupport {
+ @Override
public ExitStatus afterStep(StepExecution stepExecution) {
if (stepExecution.getReadCount() == 0) {
return ExitStatus.FAILED;
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/StepLocatorStepFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/StepLocatorStepFactoryBean.java
index 6a45a323a..da0636330 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/StepLocatorStepFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/StepLocatorStepFactoryBean.java
@@ -36,6 +36,7 @@ public class StepLocatorStepFactoryBean implements FactoryBean {
*
* @see FactoryBean#getObject()
*/
+ @Override
public Step getObject() throws Exception {
return stepLocator.getStep(stepName);
}
@@ -45,6 +46,7 @@ public class StepLocatorStepFactoryBean implements FactoryBean {
*
* @see FactoryBean#getObjectType()
*/
+ @Override
public Class extends Step> getObjectType() {
return Step.class;
}
@@ -54,6 +56,7 @@ public class StepLocatorStepFactoryBean implements FactoryBean {
*
* @see FactoryBean#isSingleton()
*/
+ @Override
public boolean isSingleton() {
return true;
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/ThreadStepInterruptionPolicy.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/ThreadStepInterruptionPolicy.java
index d551350de..6bc2077d6 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/ThreadStepInterruptionPolicy.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/ThreadStepInterruptionPolicy.java
@@ -36,6 +36,7 @@ public class ThreadStepInterruptionPolicy implements StepInterruptionPolicy {
* Returns if the current job lifecycle has been interrupted by checking if
* the current thread is interrupted.
*/
+ @Override
public void checkInterrupted(StepExecution stepExecution) throws JobInterruptedException {
if (isInterrupted(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 b7b3f3d11..dd43ce27e 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
@@ -466,6 +466,7 @@ public class FaultTolerantStepBuilder extends SimpleStepBuilder {
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);
@@ -645,6 +646,7 @@ public class FaultTolerantStepBuilder extends SimpleStepBuilder {
this.chunkListener = chunkListener;
}
+ @Override
public void beforeChunk() {
try {
chunkListener.beforeChunk();
@@ -654,6 +656,7 @@ public class FaultTolerantStepBuilder extends SimpleStepBuilder {
}
}
+ @Override
public void afterChunk() {
try {
chunkListener.afterChunk();
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/FaultTolerantStepFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/FaultTolerantStepFactoryBean.java
index 8cee29a06..7a7ca8df9 100755
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/FaultTolerantStepFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/FaultTolerantStepFactoryBean.java
@@ -217,6 +217,7 @@ public class FaultTolerantStepFactoryBean extends SimpleStepFactoryBean createBuilder(String name) {
return new FaultTolerantStepBuilder(new StepBuilder(name));
}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/SimpleStepFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/SimpleStepFactoryBean.java
index a0a983799..4d59bbfa0 100755
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/SimpleStepFactoryBean.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/SimpleStepFactoryBean.java
@@ -138,6 +138,7 @@ public class SimpleStepFactoryBean implements FactoryBean, BeanNameAware {
*
* @see org.springframework.beans.factory.BeanNameAware#setBeanName(java.lang.String)
*/
+ @Override
public void setBeanName(String name) {
this.name = name;
}
@@ -314,6 +315,7 @@ public class SimpleStepFactoryBean implements FactoryBean, BeanNameAware {
*
* @see FactoryBean#getObject()
*/
+ @Override
public final Object getObject() throws Exception {
SimpleStepBuilder builder = createBuilder(getName());
applyConfiguration(builder);
@@ -325,6 +327,7 @@ public class SimpleStepFactoryBean implements FactoryBean, BeanNameAware {
return new SimpleStepBuilder(new StepBuilder(name));
}
+ @Override
public Class getObjectType() {
return TaskletStep.class;
}
@@ -335,6 +338,7 @@ public class SimpleStepFactoryBean implements FactoryBean, BeanNameAware {
*
* @see org.springframework.beans.factory.FactoryBean#isSingleton()
*/
+ @Override
public boolean isSingleton() {
return this.singleton;
}
@@ -487,4 +491,4 @@ public class SimpleStepFactoryBean implements FactoryBean, BeanNameAware {
}
}
-}
\ No newline at end of file
+}
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/BatchRetryTemplate.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/BatchRetryTemplate.java
index 8e995f956..a15092aa1 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/BatchRetryTemplate.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/BatchRetryTemplate.java
@@ -210,20 +210,24 @@ public class BatchRetryTemplate implements RetryOperations {
return delegate.execute(retryCallback, recoveryCallback, batchState);
}
+ @Override
public final T execute(RetryCallback retryCallback, RecoveryCallback recoveryCallback,
RetryState retryState) throws Exception, ExhaustedRetryException {
return regular.execute(retryCallback, recoveryCallback, retryState);
}
+ @Override
public final T execute(RetryCallback retryCallback, RecoveryCallback recoveryCallback) throws Exception {
return regular.execute(retryCallback, recoveryCallback);
}
+ @Override
public final T execute(RetryCallback retryCallback, RetryState retryState) throws Exception,
ExhaustedRetryException {
return regular.execute(retryCallback, retryState);
}
+ @Override
public final T execute(RetryCallback retryCallback) throws Exception {
return regular.execute(retryCallback);
}
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 936807fc1..28d06ebf2 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
@@ -123,6 +123,7 @@ public class Chunk implements Iterable {
* Get an unmodifiable iterator for the underlying items.
* @see java.lang.Iterable#iterator()
*/
+ @Override
public ChunkIterator iterator() {
return new ChunkIterator(items);
}
@@ -213,10 +214,12 @@ public class Chunk implements Iterable {
iterator = items.iterator();
}
+ @Override
public boolean hasNext() {
return iterator.hasNext();
}
+ @Override
public W next() {
next = iterator.next();
return next;
@@ -227,6 +230,7 @@ public class Chunk implements Iterable {
skips.add(new SkipWrapper(next, e));
}
+ @Override
public void remove() {
if (next == null) {
if (iterator.hasNext()) {
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/ChunkMonitor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/ChunkMonitor.java
index 684ab57b1..deaaa43be 100644
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/ChunkMonitor.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/ChunkMonitor.java
@@ -93,6 +93,7 @@ public class ChunkMonitor implements ItemStream {
resetOffset();
}
+ @Override
public void close() throws ItemStreamException {
holder.set(null);
if (streamsRegistered) {
@@ -100,6 +101,7 @@ public class ChunkMonitor implements ItemStream {
}
}
+ @Override
public void open(ExecutionContext executionContext) throws ItemStreamException {
if (streamsRegistered) {
stream.open(executionContext);
@@ -120,6 +122,7 @@ public class ChunkMonitor implements ItemStream {
}
}
+ @Override
public void update(ExecutionContext executionContext) throws ItemStreamException {
if (streamsRegistered) {
ChunkMonitorData data = getData();
@@ -146,4 +149,4 @@ public class ChunkMonitor implements ItemStream {
return data;
}
-}
\ No newline at end of file
+}
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 bf0ebbe14..6f2b79a3a 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
@@ -60,6 +60,7 @@ public class ChunkOrientedTasklet implements Tasklet {
this.buffering = buffering;
}
+ @Override
public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception {
@SuppressWarnings("unchecked")
diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/FaultTolerantChunkProcessor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/FaultTolerantChunkProcessor.java
index 608364cf5..e3a86551f 100755
--- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/FaultTolerantChunkProcessor.java
+++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/FaultTolerantChunkProcessor.java
@@ -212,6 +212,7 @@ public class FaultTolerantChunkProcessor extends SimpleChunkProcessor retryCallback = new RetryCallback() {
+ @Override
public O doWithRetry(RetryContext context) throws Exception {
O output = null;
try {
@@ -263,6 +264,7 @@ public class FaultTolerantChunkProcessor extends SimpleChunkProcessor recoveryCallback = new RecoveryCallback() {
+ @Override
public O recover(RetryContext context) throws Exception {
Throwable e = context.getLastThrowable();
if (shouldSkip(itemProcessSkipPolicy, e, contribution.getStepSkipCount())) {
@@ -316,6 +318,7 @@ public class FaultTolerantChunkProcessor extends SimpleChunkProcessor contextHolder = new AtomicReference();
RetryCallback