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 aa41a85c5..edaa4986e 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 @@ -187,11 +187,6 @@ public class ExitStatus implements Serializable, Comparable { return 7; } - /* - * (non-Javadoc) - * - * @see java.lang.Object#toString() - */ @Override public String toString() { return String.format("exitCode=%s;exitDescription=%s", exitCode, exitDescription); 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 ee8873031..c595f43e4 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 @@ -373,11 +373,6 @@ public class JobExecution extends Entity { failureExceptions = new ArrayList<>(); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.domain.Entity#toString() - */ @Override public String toString() { return super.toString() + String.format( 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 2396e05d3..fcbeaa928 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 @@ -194,11 +194,6 @@ public class StepContribution implements Serializable { return stepExecution; } - /* - * (non-Javadoc) - * - * @see java.lang.Object#toString() - */ @Override public String toString() { return "[StepContribution: read=" + readCount + ", written=" + writeCount + ", filtered=" + filterCount 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 8dbfb020e..1bf516477 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 @@ -484,12 +484,6 @@ public class StepExecution extends Entity { this.failureExceptions.add(throwable); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.container.common.domain.Entity#equals(java. - * lang.Object) - */ @Override public boolean equals(Object obj) { @@ -513,11 +507,6 @@ public class StepExecution extends Entity { failureExceptions = new ArrayList<>(); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.container.common.domain.Entity#hashCode() - */ @Override public int hashCode() { Object jobExecutionId = getJobExecutionId(); 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 7c50d964b..2ea527202 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 @@ -1,5 +1,5 @@ /* - * Copyright 2006-2022 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -97,11 +97,6 @@ public class GroupAwareJob implements Job { return delegate.getJobParametersValidator(); } - /* - * (non-Javadoc) - * - * @see java.lang.Object#equals(java.lang.Object) - */ @Override public boolean equals(Object obj) { if (obj instanceof GroupAwareJob) { @@ -110,11 +105,6 @@ public class GroupAwareJob implements Job { return false; } - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ @Override public int hashCode() { return delegate.hashCode(); 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 0670560c9..35625920f 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 @@ -79,12 +79,6 @@ public class JobRegistryBeanPostProcessor this.jobRegistry = jobRegistry; } - /* - * (non-Javadoc) - * - * @see org.springframework.beans.factory.BeanFactoryAware#setBeanFactory(org - * .springframework.beans.factory.BeanFactory) - */ @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { if (beanFactory instanceof DefaultListableBeanFactory) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractFlowParser.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractFlowParser.java index 7ea639469..03ec94b23 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractFlowParser.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractFlowParser.java @@ -141,11 +141,6 @@ public abstract class AbstractFlowParser extends AbstractSingleBeanDefinitionPar this.jobFactoryRef = jobFactoryRef; } - /* - * (non-Javadoc) - * - * @see AbstractSingleBeanDefinitionParser#getBeanClass(Element) - */ @Override protected Class getBeanClass(Element element) { return SimpleFlowFactoryBean.class; 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 44173bafb..216935b2e 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 @@ -102,11 +102,6 @@ public class SimpleFlowFactoryBean implements FactoryBean, Initializ } } - /* - * (non-Javadoc) - * - * @see org.springframework.beans.factory.FactoryBean#getObject() - */ @Override public SimpleFlow getObject() throws Exception { SimpleFlow flow = flowType.getConstructor(String.class).newInstance(name); 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 e02d7d4a7..236be9902 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 @@ -80,12 +80,6 @@ public class SimpleJobExplorer implements JobExplorer { this.ecDao = ecDao; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.explore.JobExplorer#findJobExecutions( - * org.springframework.batch.core.JobInstance) - */ @Override public List getJobExecutions(JobInstance jobInstance) { List executions = jobExecutionDao.findJobExecutions(jobInstance); @@ -98,13 +92,8 @@ public class SimpleJobExplorer implements JobExplorer { return executions; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.explore.JobExplorer#getLastJobExecution( - * org.springframework.batch.core.JobInstance) - */ @Nullable + @Override public JobExecution getLastJobExecution(JobInstance jobInstance) { JobExecution lastJobExecution = jobExecutionDao.getLastJobExecution(jobInstance); if (lastJobExecution != null) { @@ -116,12 +105,6 @@ public class SimpleJobExplorer implements JobExplorer { return lastJobExecution; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.explore.JobExplorer#findRunningJobExecutions - * (java.lang.String) - */ @Override public Set findRunningJobExecutions(@Nullable String jobName) { Set executions = jobExecutionDao.findRunningJobExecutions(jobName); @@ -134,12 +117,6 @@ public class SimpleJobExplorer implements JobExplorer { return executions; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.explore.JobExplorer#getJobExecution(java - * .lang.Long) - */ @Nullable @Override public JobExecution getJobExecution(@Nullable Long executionId) { @@ -157,12 +134,6 @@ public class SimpleJobExplorer implements JobExplorer { return jobExecution; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.explore.JobExplorer#getStepExecution(java - * .lang.Long) - */ @Nullable @Override public StepExecution getStepExecution(@Nullable Long jobExecutionId, @Nullable Long executionId) { @@ -176,70 +147,34 @@ public class SimpleJobExplorer implements JobExplorer { return stepExecution; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.explore.JobExplorer#getJobInstance(java - * .lang.Long) - */ @Nullable @Override public JobInstance getJobInstance(@Nullable Long instanceId) { return jobInstanceDao.getJobInstance(instanceId); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.explore.JobExplorer#getJobInstance(java - * .lang.String, org.springframework.batch.core.JobParameters) - */ @Nullable @Override public JobInstance getJobInstance(String jobName, JobParameters jobParameters) { return jobInstanceDao.getJobInstance(jobName, jobParameters); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.explore.JobExplorer#getLastJobInstance(java - * .lang.String) - */ @Nullable @Override public JobInstance getLastJobInstance(String jobName) { return jobInstanceDao.getLastJobInstance(jobName); } - /* - * (non-Javadoc) - * - * @see 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); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.explore.JobExplorer#getJobNames() - */ @Override public List getJobNames() { return jobInstanceDao.getJobNames(); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.explore.JobExplorer#getJobInstanceCount(java.lang. - * String) - */ @Override public long getJobInstanceCount(@Nullable String jobName) throws NoSuchJobException { return jobInstanceDao.getJobInstanceCount(jobName); 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 7698e3ac8..34d6d19f5 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 @@ -158,11 +158,6 @@ public abstract class AbstractJob implements Job, StepLocator, BeanNameAware, In this.name = name; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.domain.IJob#getName() - */ @Override public String getName() { return name; @@ -214,11 +209,6 @@ public abstract class AbstractJob implements Job, StepLocator, BeanNameAware, In this.jobParametersIncrementer = jobParametersIncrementer; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.Job#getJobParametersIncrementer() - */ @Override @Nullable public JobParametersIncrementer getJobParametersIncrementer() { 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 bf4797ec1..b22317ef2 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 @@ -94,11 +94,6 @@ public class SimpleJob extends AbstractJob { this.steps.add(step); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.job.AbstractJob#getStep(java.lang.String) - */ @Override public Step getStep(String stepName) { for (Step step : this.steps) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/DefaultStateTransitionComparator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/DefaultStateTransitionComparator.java index 1d43ccc1a..ef60c0a78 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/DefaultStateTransitionComparator.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/DefaultStateTransitionComparator.java @@ -1,5 +1,5 @@ /* - * Copyright 2013 the original author or authors. + * Copyright 2013-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,11 +32,6 @@ public class DefaultStateTransitionComparator implements Comparator getStepNames() { List names = new ArrayList<>(); @@ -101,11 +91,6 @@ public class StepState extends AbstractState implements StepLocator, StepHolder return names; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.step.StepLocator#getStep(java.lang.String) - */ @Override public Step getStep(String stepName) throws NoSuchStepException { Step result = null; 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 6957a93c3..cc0e3536d 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 @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,12 +24,6 @@ import org.aopalliance.intercept.MethodInvocation; */ 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 { 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 633c7d1df..f700e35e5 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 @@ -152,12 +152,6 @@ public class SimpleJobOperator implements JobOperator, InitializingBean { this.jobLauncher = jobLauncher; } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.launch.JobOperator#getExecutions(java.lang.Long) - */ @Override public List getExecutions(long instanceId) throws NoSuchJobInstanceException { JobInstance jobInstance = jobExplorer.getJobInstance(instanceId); @@ -171,21 +165,11 @@ public class SimpleJobOperator implements JobOperator, InitializingBean { return list; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.launch.JobOperator#getJobNames() - */ @Override public Set getJobNames() { return new TreeSet<>(jobRegistry.getJobNames()); } - /* - * (non-Javadoc) - * - * @see JobOperator#getLastInstances(String, int, int) - */ @Override public List getJobInstances(String jobName, int start, int count) throws NoSuchJobException { List list = new ArrayList<>(); @@ -199,23 +183,12 @@ public class SimpleJobOperator implements JobOperator, InitializingBean { return list; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.launch.JobOperator#getJobInstance(String, - * JobParameters) - */ + @Override @Nullable public JobInstance getJobInstance(String jobName, JobParameters jobParameters) { return this.jobExplorer.getJobInstance(jobName, jobParameters); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.launch.JobOperator#getParameters(java. - * lang.Long) - */ @Override public String getParameters(long executionId) throws NoSuchJobExecutionException { JobExecution jobExecution = findExecutionById(executionId); @@ -225,12 +198,6 @@ public class SimpleJobOperator implements JobOperator, InitializingBean { return PropertiesConverter.propertiesToString(properties); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.launch.JobOperator#getRunningExecutions - * (java.lang.String) - */ @Override public Set getRunningExecutions(String jobName) throws NoSuchJobException { Set set = new LinkedHashSet<>(); @@ -243,12 +210,6 @@ public class SimpleJobOperator implements JobOperator, InitializingBean { return set; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.launch.JobOperator#getStepExecutionSummaries - * (java.lang.Long) - */ @Override public Map getStepExecutionSummaries(long executionId) throws NoSuchJobExecutionException { JobExecution jobExecution = findExecutionById(executionId); @@ -260,22 +221,12 @@ public class SimpleJobOperator implements JobOperator, InitializingBean { return map; } - /* - * (non-Javadoc) - * - * @see 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(); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.launch.JobOperator#resume(java.lang.Long) - */ @Override public Long restart(long executionId) throws JobInstanceAlreadyCompleteException, NoSuchJobExecutionException, NoSuchJobException, JobRestartException, JobParametersInvalidException { @@ -302,12 +253,6 @@ public class SimpleJobOperator implements JobOperator, InitializingBean { } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.launch.JobOperator#start(java.lang.String, - * java.lang.String) - */ @Override @Deprecated(since = "5.0.1", forRemoval = true) public Long start(String jobName, String parameters) @@ -316,12 +261,6 @@ public class SimpleJobOperator implements JobOperator, InitializingBean { return start(jobName, properties); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.launch.JobOperator#start(java.lang.String, - * java.util.Properties) - */ @Override public Long start(String jobName, Properties parameters) throws NoSuchJobException, JobInstanceAlreadyExistsException, JobParametersInvalidException { @@ -360,11 +299,6 @@ public class SimpleJobOperator implements JobOperator, InitializingBean { } - /* - * (non-Javadoc) - * - * @see JobOperator#startNextInstance(String ) - */ @Override public Long startNextInstance(String jobName) throws NoSuchJobException, UnexpectedJobExecutionException, JobParametersInvalidException { @@ -395,11 +329,6 @@ public class SimpleJobOperator implements JobOperator, InitializingBean { } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.launch.JobOperator#stop(java.lang.Long) - */ @Override public boolean stop(long executionId) throws NoSuchJobExecutionException, JobExecutionNotRunningException { 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 0b71a6fa9..79d742240 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 @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,31 +28,15 @@ import org.springframework.batch.core.scope.context.ChunkContext; @Deprecated public class ChunkListenerSupport implements ChunkListener { - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.domain.ChunkListener#afterChunk() - */ @Override public void afterChunk(ChunkContext context) { } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.domain.ChunkListener#beforeChunk() - */ @Override public void beforeChunk(ChunkContext context) { } @Override - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.domain.ChunkListener#afterChunkError(ChunkContext) - */ public void afterChunkError(ChunkContext context) { } 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 b28dbeed4..fe54e5a6b 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 @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,22 +26,10 @@ import org.springframework.batch.core.JobExecutionListener; @Deprecated 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/SkipListenerSupport.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/SkipListenerSupport.java index b61eb4f2f..00001e2ee 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 @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,31 +28,14 @@ import org.springframework.batch.core.SkipListener; @Deprecated 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) - */ @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 6853e454e..bd4bedb07 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 @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,25 +28,12 @@ import org.springframework.lang.Nullable; @Deprecated public class StepExecutionListenerSupport implements StepExecutionListener { - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.domain.StepListener#afterStep(StepExecution - * stepExecution) - */ @Nullable @Override public ExitStatus afterStep(StepExecution stepExecution) { return null; } - /* - * (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/repository/dao/Jackson2ExecutionContextStringSerializer.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/Jackson2ExecutionContextStringSerializer.java index 0d7472866..9890c0985 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/Jackson2ExecutionContextStringSerializer.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/Jackson2ExecutionContextStringSerializer.java @@ -140,6 +140,7 @@ public class Jackson2ExecutionContextStringSerializer implements ExecutionContex this.objectMapper.registerModule(new JobParametersModule()); } + @Override public Map deserialize(InputStream in) throws IOException { TypeReference> typeRef = new TypeReference<>() { @@ -147,6 +148,7 @@ public class Jackson2ExecutionContextStringSerializer implements ExecutionContex return objectMapper.readValue(in, typeRef); } + @Override public void serialize(Map context, OutputStream out) throws IOException { Assert.notNull(context, "A context is required"); 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 e55b791e4..14fd39e02 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 @@ -254,6 +254,7 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem * Delete the execution context of the given {@link JobExecution}. * @param jobExecution {@link JobExecution} that contains the context to delete. */ + @Override public void deleteExecutionContext(JobExecution jobExecution) { getJdbcTemplate().update(getQuery(DELETE_JOB_EXECUTION_CONTEXT), jobExecution.getId()); } @@ -262,6 +263,7 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem * Delete the execution context of the given {@link StepExecution}. * @param stepExecution {@link StepExecution} that contains the context to delete. */ + @Override public void deleteExecutionContext(StepExecution stepExecution) { getJdbcTemplate().update(getQuery(DELETE_STEP_EXECUTION_CONTEXT), stepExecution.getId()); } 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 17ace20ad..9ec0a9e2d 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 @@ -352,12 +352,6 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements } } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.repository.dao.JobExecutionDao# - * getLastJobExecution(java.lang.String) - */ @Override @Nullable public JobExecution getJobExecution(Long executionId) { @@ -370,12 +364,6 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements } } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.repository.dao.JobExecutionDao# - * findRunningJobExecutions(java.lang.String) - */ @Override public Set findRunningJobExecutions(String jobName) { @@ -405,6 +393,7 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements * Delete the given job execution. * @param jobExecution the job execution to delete */ + @Override public void deleteJobExecution(JobExecution jobExecution) { getJdbcTemplate().update(getQuery(DELETE_JOB_EXECUTION), jobExecution.getId()); } @@ -413,6 +402,7 @@ public class JdbcJobExecutionDao extends AbstractJdbcBatchMetadataDao implements * Delete the parameters associated with the given job execution. * @param jobExecution the job execution for which job parameters should be deleted */ + @Override public void deleteJobExecutionParameters(JobExecution jobExecution) { getJdbcTemplate().update(getQuery(DELETE_JOB_EXECUTION_PARAMETERS), jobExecution.getId()); } 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 0e08352fa..27dcc8b7a 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 @@ -195,12 +195,6 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements } } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.repository.dao.JobInstanceDao#getJobInstance - * (java.lang.Long) - */ @Override @Nullable public JobInstance getJobInstance(@Nullable Long instanceId) { @@ -214,22 +208,11 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.repository.dao.JobInstanceDao#getJobNames () - */ @Override public List getJobNames() { return getJdbcTemplate().query(getQuery(FIND_JOB_NAMES), (rs, rowNum) -> rs.getString(1)); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.repository.dao.JobInstanceDao# - * getLastJobInstances(java.lang.String, int) - */ @Override public List getJobInstances(String jobName, final int start, final int count) { @@ -256,12 +239,6 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements return getJdbcTemplate().query(getQuery(FIND_LAST_JOBS_BY_NAME), extractor, jobName); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.repository.dao.JobInstanceDao# - * getLastJobInstance(java.lang.String) - */ @Override @Nullable public JobInstance getLastJobInstance(String jobName) { @@ -274,12 +251,6 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements } } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.repository.dao.JobInstanceDao#getJobInstance - * (org.springframework.batch.core.JobExecution) - */ @Override @Nullable public JobInstance getJobInstance(JobExecution jobExecution) { @@ -293,13 +264,6 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements } } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.repository.dao.JobInstanceDao#getJobInstanceCount( - * java.lang.String) - */ @Override public long getJobInstanceCount(@Nullable String jobName) throws NoSuchJobException { @@ -315,6 +279,7 @@ public class JdbcJobInstanceDao extends AbstractJdbcBatchMetadataDao implements * Delete the job instance. * @param jobInstance the job instance to delete */ + @Override public void deleteJobInstance(JobInstance jobInstance) { getJdbcTemplate().update(getQuery(DELETE_JOB_INSTANCE), jobInstance.getId()); } 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 5c53a6f4a..795d8b1b4 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 @@ -372,6 +372,7 @@ public class JdbcStepExecutionDao extends AbstractJdbcBatchMetadataDao implement * Delete the given step execution. * @param stepExecution the step execution to delete */ + @Override public void deleteStepExecution(StepExecution stepExecution) { getJdbcTemplate().update(getQuery(DELETE_STEP_EXECUTION), stepExecution.getId()); } diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/context/ChunkContext.java b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/context/ChunkContext.java index 5a263ae3b..57691b1c5 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/scope/context/ChunkContext.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/scope/context/ChunkContext.java @@ -63,11 +63,6 @@ public class ChunkContext extends AttributeAccessorSupport { this.complete = true; } - /* - * (non-Javadoc) - * - * @see java.lang.Object#toString() - */ @Override public String toString() { return String.format("ChunkContext: attributes=%s, complete=%b, stepContext=%s", diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletStep.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletStep.java index b4ede49ed..8b2cf1e1b 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletStep.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/TaskletStep.java @@ -114,11 +114,6 @@ public class TaskletStep extends AbstractStep { super(name); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.step.AbstractStep#afterPropertiesSet() - */ @Override public void afterPropertiesSet() throws Exception { super.afterPropertiesSet(); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/JobExecutionExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/JobExecutionExceptionTests.java index f02e10c41..7fa33e925 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/JobExecutionExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/JobExecutionExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,25 +21,11 @@ package org.springframework.batch.core; */ public class JobExecutionExceptionTests extends AbstractExceptionTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String) - */ @Override public Exception getException(String msg) throws Exception { return new JobExecutionException(msg); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String, java.lang.Throwable) - */ @Override public Exception getException(String msg, Throwable t) throws Exception { return new JobExecutionException(msg, t); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/JobInterruptedExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/JobInterruptedExceptionTests.java index 9d1259e13..43d76decd 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/JobInterruptedExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/JobInterruptedExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,25 +21,11 @@ package org.springframework.batch.core; */ public class JobInterruptedExceptionTests extends AbstractExceptionTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String) - */ @Override public Exception getException(String msg) throws Exception { return new JobInterruptedException(msg); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String, java.lang.Throwable) - */ @Override public Exception getException(String msg, Throwable t) throws Exception { return new RuntimeException(msg, t); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/PooledEmbeddedDataSource.java b/spring-batch-core/src/test/java/org/springframework/batch/core/PooledEmbeddedDataSource.java index 8b6c16340..eda571d1e 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/PooledEmbeddedDataSource.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/PooledEmbeddedDataSource.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,95 +42,51 @@ public class PooledEmbeddedDataSource implements EmbeddedDatabase { this.dataSource = dataSource; } - /* - * (non-Javadoc) - * - * @see javax.sql.DataSource#getConnection() - */ @Override public Connection getConnection() throws SQLException { return this.dataSource.getConnection(); } - /* - * (non-Javadoc) - * - * @see javax.sql.DataSource#getConnection(java.lang.String, java.lang.String) - */ @Override public Connection getConnection(String username, String password) throws SQLException { return this.dataSource.getConnection(username, password); } - /* - * (non-Javadoc) - * - * @see javax.sql.CommonDataSource#getLogWriter() - */ @Override public PrintWriter getLogWriter() throws SQLException { return this.dataSource.getLogWriter(); } - /* - * (non-Javadoc) - * - * @see javax.sql.CommonDataSource#setLogWriter(java.io.PrintWriter) - */ @Override public void setLogWriter(PrintWriter out) throws SQLException { this.dataSource.setLogWriter(out); } - /* - * (non-Javadoc) - * - * @see javax.sql.CommonDataSource#getLoginTimeout() - */ @Override public int getLoginTimeout() throws SQLException { return this.dataSource.getLoginTimeout(); } - /* - * (non-Javadoc) - * - * @see javax.sql.CommonDataSource#setLoginTimeout(int) - */ @Override public void setLoginTimeout(int seconds) throws SQLException { this.dataSource.setLoginTimeout(seconds); } - /* - * (non-Javadoc) - * - * @see java.sql.Wrapper#unwrap(java.lang.Class) - */ @Override public T unwrap(Class iface) throws SQLException { return this.dataSource.unwrap(iface); } - /* - * (non-Javadoc) - * - * @see java.sql.Wrapper#isWrapperFor(java.lang.Class) - */ @Override public boolean isWrapperFor(Class iface) throws SQLException { return this.dataSource.isWrapperFor(iface); } + @Override public Logger getParentLogger() { return Logger.getLogger(Logger.GLOBAL_LOGGER_NAME); } - /* - * (non-Javadoc) - * - * @see org.springframework.jdbc.datasource.embedded.EmbeddedDatabase#shutdown() - */ @Override public void shutdown() { } diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/DuplicateJobExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/DuplicateJobExceptionTests.java index 50c28e19e..81d82d882 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/DuplicateJobExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/DuplicateJobExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests; */ public class DuplicateJobExceptionTests extends AbstractExceptionTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String) - */ @Override public Exception getException(String msg) throws Exception { return new DuplicateJobException(msg); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String, java.lang.Throwable) - */ @Override public Exception getException(String msg, Throwable t) throws Exception { return new DuplicateJobException(msg, t); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/annotation/StepScopeConfigurationTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/annotation/StepScopeConfigurationTests.java index 7db10118c..5774e0031 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/annotation/StepScopeConfigurationTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/annotation/StepScopeConfigurationTests.java @@ -230,6 +230,7 @@ public class StepScopeConfigurationTests { this.value = value; } + @Override public String call() throws Exception { return value; } diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/support/DefaultBatchConfigurationTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/support/DefaultBatchConfigurationTests.java index 6c54df5a9..d80dd2171 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/support/DefaultBatchConfigurationTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/support/DefaultBatchConfigurationTests.java @@ -155,6 +155,7 @@ class DefaultBatchConfigurationTests { static class MyJobConfigurationWithCustomInfrastructureBean extends MyJobConfiguration { @Bean + @Override public JobRepository jobRepository() { return new DummyJobRepository(); } diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/converter/JobParametersConverterSupport.java b/spring-batch-core/src/test/java/org/springframework/batch/core/converter/JobParametersConverterSupport.java index 45e882eab..c28bdff26 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/converter/JobParametersConverterSupport.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/converter/JobParametersConverterSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2022 the original author or authors. + * Copyright 2013-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,13 +40,6 @@ public class JobParametersConverterSupport implements JobParametersConverter { return builder.toJobParameters(); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.converter.JobParametersConverter#getProperties(org. - * springframework.batch.core.JobParameters) - */ @Override public Properties getProperties(@Nullable JobParameters params) { Properties properties = new Properties(); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/job/JobSupport.java b/spring-batch-core/src/test/java/org/springframework/batch/core/job/JobSupport.java index 7d1fee79c..c5e32aa0f 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/job/JobSupport.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/job/JobSupport.java @@ -23,14 +23,12 @@ import java.util.Map; import org.springframework.batch.core.Job; import org.springframework.batch.core.JobExecution; -import org.springframework.batch.core.JobParametersIncrementer; import org.springframework.batch.core.JobParametersValidator; import org.springframework.batch.core.Step; import org.springframework.batch.core.UnexpectedJobExecutionException; import org.springframework.batch.core.step.NoSuchStepException; import org.springframework.batch.core.step.StepLocator; import org.springframework.beans.factory.BeanNameAware; -import org.springframework.lang.Nullable; import org.springframework.util.ClassUtils; /** @@ -50,8 +48,6 @@ public class JobSupport implements BeanNameAware, Job, StepLocator { private boolean restartable = false; - private int startLimit = Integer.MAX_VALUE; - private DefaultJobParametersValidator jobParametersValidator = new DefaultJobParametersValidator(); /** @@ -96,11 +92,6 @@ public class JobSupport implements BeanNameAware, Job, StepLocator { this.name = name; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.domain.IJob#getName() - */ @Override public String getName() { return name; @@ -124,39 +115,15 @@ public class JobSupport implements BeanNameAware, Job, StepLocator { this.steps.put(step.getName(), step); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.domain.IJob#getStartLimit() - */ - public int getStartLimit() { - return startLimit; - } - - public void setStartLimit(int startLimit) { - this.startLimit = startLimit; - } - public void setRestartable(boolean restartable) { this.restartable = restartable; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.domain.IJob#isRestartable() - */ @Override public boolean isRestartable() { return restartable; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.domain.Job#run(org.springframework.batch - * .core.domain.JobExecution) - */ @Override public void execute(JobExecution execution) throws UnexpectedJobExecutionException { throw new UnsupportedOperationException( @@ -168,17 +135,6 @@ public class JobSupport implements BeanNameAware, Job, StepLocator { return ClassUtils.getShortName(getClass()) + ": [name=" + name + "]"; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.Job#getJobParametersIncrementer() - */ - @Nullable - @Override - public JobParametersIncrementer getJobParametersIncrementer() { - return null; - } - @Override public JobParametersValidator getJobParametersValidator() { return jobParametersValidator; diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/job/SimpleJobTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/job/SimpleJobTests.java index 29b359ab4..37a139060 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/job/SimpleJobTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/job/SimpleJobTests.java @@ -559,12 +559,6 @@ class SimpleJobTests { this.runnable = runnable; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.step.StepSupport#execute(org. - * springframework.batch.core.StepExecution) - */ @Override public void execute(StepExecution stepExecution) throws JobInterruptedException, UnexpectedJobExecutionException { diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/JobExecutionNotFailedExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/JobExecutionNotFailedExceptionTests.java index 144e474ca..de278037b 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/JobExecutionNotFailedExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/JobExecutionNotFailedExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests; */ public class JobExecutionNotFailedExceptionTests extends AbstractExceptionTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String) - */ @Override public Exception getException(String msg) throws Exception { return new JobExecutionNotFailedException(msg); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String, java.lang.Throwable) - */ @Override public Exception getException(String msg, Throwable t) throws Exception { return new JobExecutionNotFailedException(msg, t); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/JobInstanceAlreadyExistsExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/JobInstanceAlreadyExistsExceptionTests.java index 0f09aeb82..f49645652 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/JobInstanceAlreadyExistsExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/JobInstanceAlreadyExistsExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests; */ public class JobInstanceAlreadyExistsExceptionTests extends AbstractExceptionTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String) - */ @Override public Exception getException(String msg) throws Exception { return new JobInstanceAlreadyExistsException(msg); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String, java.lang.Throwable) - */ @Override public Exception getException(String msg, Throwable t) throws Exception { return new JobInstanceAlreadyExistsException(msg, t); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/JobParametersNotFoundExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/JobParametersNotFoundExceptionTests.java index cb0edbd76..cdafe4841 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/JobParametersNotFoundExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/JobParametersNotFoundExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests; */ public class JobParametersNotFoundExceptionTests extends AbstractExceptionTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String) - */ @Override public Exception getException(String msg) throws Exception { return new JobParametersNotFoundException(msg); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String, java.lang.Throwable) - */ @Override public Exception getException(String msg, Throwable t) throws Exception { return new JobParametersNotFoundException(msg, t); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/NoSuchJobExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/NoSuchJobExceptionTests.java index 4344549fa..137e956e9 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/NoSuchJobExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/NoSuchJobExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,6 @@ package org.springframework.batch.core.launch; import org.springframework.batch.core.AbstractExceptionTests; -import org.springframework.batch.core.launch.NoSuchJobException; /** * @author Dave Syer @@ -24,25 +23,11 @@ import org.springframework.batch.core.launch.NoSuchJobException; */ public class NoSuchJobExceptionTests extends AbstractExceptionTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String) - */ @Override public Exception getException(String msg) throws Exception { return new NoSuchJobException(msg); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String, java.lang.Throwable) - */ @Override public Exception getException(String msg, Throwable t) throws Exception { return new NoSuchJobException(msg, t); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/NoSuchJobExecutionExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/NoSuchJobExecutionExceptionTests.java index 403c95fb3..178335f83 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/NoSuchJobExecutionExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/NoSuchJobExecutionExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests; */ public class NoSuchJobExecutionExceptionTests extends AbstractExceptionTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String) - */ @Override public Exception getException(String msg) throws Exception { return new NoSuchJobExecutionException(msg); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String, java.lang.Throwable) - */ @Override public Exception getException(String msg, Throwable t) throws Exception { return new NoSuchJobExecutionException(msg, t); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/NoSuchJobInstanceExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/NoSuchJobInstanceExceptionTests.java index 070bfabe6..9f8c6cb64 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/launch/NoSuchJobInstanceExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/launch/NoSuchJobInstanceExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests; */ public class NoSuchJobInstanceExceptionTests extends AbstractExceptionTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String) - */ @Override public Exception getException(String msg) throws Exception { return new NoSuchJobInstanceException(msg); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String, java.lang.Throwable) - */ @Override public Exception getException(String msg, Throwable t) throws Exception { return new NoSuchJobInstanceException(msg, t); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/listener/MulticasterBatchListenerTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/listener/MulticasterBatchListenerTests.java index d87de812b..0a8fedd77 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/listener/MulticasterBatchListenerTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/listener/MulticasterBatchListenerTests.java @@ -608,11 +608,6 @@ class MulticasterBatchListenerTests { super.onReadError(ex); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.listener.StepListenerSupport#afterChunk () - */ @Override public void afterChunk(ChunkContext context) { count++; @@ -622,12 +617,6 @@ class MulticasterBatchListenerTests { super.afterChunk(context); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.listener.StepListenerSupport#afterRead - * (java.lang.Object) - */ @Override public void afterRead(Integer item) { count++; @@ -637,12 +626,6 @@ class MulticasterBatchListenerTests { super.afterRead(item); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.listener.StepListenerSupport#afterStep - * (org.springframework.batch.core.StepExecution) - */ @Nullable @Override public ExitStatus afterStep(StepExecution stepExecution) { @@ -653,11 +636,6 @@ class MulticasterBatchListenerTests { return super.afterStep(stepExecution); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.listener.StepListenerSupport#beforeChunk () - */ @Override public void beforeChunk(ChunkContext context) { count++; @@ -667,11 +645,6 @@ class MulticasterBatchListenerTests { super.beforeChunk(context); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.listener.StepListenerSupport#beforeRead () - */ @Override public void beforeRead() { count++; @@ -681,12 +654,6 @@ class MulticasterBatchListenerTests { super.beforeRead(); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.listener.StepListenerSupport#beforeStep - * (org.springframework.batch.core.StepExecution) - */ @Override public void beforeStep(StepExecution stepExecution) { count++; @@ -696,12 +663,6 @@ class MulticasterBatchListenerTests { super.beforeStep(stepExecution); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.listener.StepListenerSupport#afterWrite - * (java.util.List) - */ @Override public void afterWrite(Chunk items) { count++; @@ -711,12 +672,6 @@ class MulticasterBatchListenerTests { super.afterWrite(items); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.listener.StepListenerSupport#beforeWrite - * (java.util.List) - */ @Override public void beforeWrite(Chunk items) { count++; @@ -726,12 +681,6 @@ class MulticasterBatchListenerTests { super.beforeWrite(items); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.listener.StepListenerSupport#onWriteError - * (java.lang.Exception, java.util.List) - */ @Override public void onWriteError(Exception exception, Chunk items) { count++; diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/repository/JobExecutionAlreadyRunningExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/repository/JobExecutionAlreadyRunningExceptionTests.java index f02f66d05..ac99382eb 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/repository/JobExecutionAlreadyRunningExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/repository/JobExecutionAlreadyRunningExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests; */ public class JobExecutionAlreadyRunningExceptionTests extends AbstractExceptionTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String) - */ @Override public Exception getException(String msg) throws Exception { return new JobExecutionAlreadyRunningException(msg); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String, java.lang.Throwable) - */ @Override public Exception getException(String msg, Throwable t) throws Exception { return new JobExecutionAlreadyRunningException(msg, t); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/repository/JobInstanceAlreadyCompleteExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/repository/JobInstanceAlreadyCompleteExceptionTests.java index d550196ac..2ffeac9ac 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/repository/JobInstanceAlreadyCompleteExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/repository/JobInstanceAlreadyCompleteExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests; */ public class JobInstanceAlreadyCompleteExceptionTests extends AbstractExceptionTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String) - */ @Override public Exception getException(String msg) throws Exception { return new JobInstanceAlreadyCompleteException(msg); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String, java.lang.Throwable) - */ @Override public Exception getException(String msg, Throwable t) throws Exception { return new JobInstanceAlreadyCompleteException(msg, t); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/repository/JobRestartExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/repository/JobRestartExceptionTests.java index 926be5d4e..5e3b5c944 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/repository/JobRestartExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/repository/JobRestartExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,25 +23,11 @@ import org.springframework.batch.core.AbstractExceptionTests; */ public class JobRestartExceptionTests extends AbstractExceptionTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String) - */ @Override public Exception getException(String msg) throws Exception { return new JobRestartException(msg); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.exception.AbstractExceptionTests#getException(java. - * lang.String, java.lang.Throwable) - */ @Override public Exception getException(String msg, Throwable t) throws Exception { return new JobRestartException(msg, t); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/step/JobRepositorySupport.java b/spring-batch-core/src/test/java/org/springframework/batch/core/step/JobRepositorySupport.java index 67bf9f1fc..18fc0a7e9 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/step/JobRepositorySupport.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/step/JobRepositorySupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2022 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,40 +32,16 @@ import org.springframework.lang.Nullable; */ public class JobRepositorySupport implements JobRepository { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.container.common.repository.JobRepository#findOrCreateJob - * (org.springframework.batch.container.common.domain.JobConfiguration) - */ @Override public JobExecution createJobExecution(String jobName, JobParameters jobParameters) { JobInstance jobInstance = new JobInstance(0L, jobName); return new JobExecution(jobInstance, 11L, jobParameters); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.container.common.repository.JobRepository#saveOrUpdate( - * org.springframework.batch.container.common.domain.JobExecution) - */ @Override public void update(JobExecution jobExecution) { } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.container.common.repository.JobRepository#update(org. - * springframework.batch.container.common.domain.Job) - */ - public void update(JobInstance job) { - } - @Nullable @Override public JobInstance getJobInstance(String jobName, JobParameters jobParameters) { @@ -83,14 +59,6 @@ public class JobRepositorySupport implements JobRepository { return 0; } - public int getJobExecutionCount(JobInstance jobInstance) { - return 0; - } - - public JobExecution getLastJobExecution(JobInstance jobInstance) { - return null; - } - @Override public void add(StepExecution stepExecution) { } @@ -103,13 +71,6 @@ public class JobRepositorySupport implements JobRepository { public void updateExecutionContext(StepExecution stepExecution) { } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.repository.JobRepository#isJobInstanceExists(java. - * lang.String, org.springframework.batch.core.JobParameters) - */ @Override public boolean isJobInstanceExists(String jobName, JobParameters jobParameters) { return false; diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/ForceRollbackForWriteSkipExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/ForceRollbackForWriteSkipExceptionTests.java index 2115780e8..2bf0db271 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/ForceRollbackForWriteSkipExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/step/item/ForceRollbackForWriteSkipExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,13 +23,6 @@ import org.springframework.batch.core.AbstractExceptionWithCauseTests; */ public class ForceRollbackForWriteSkipExceptionTests extends AbstractExceptionWithCauseTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.listener.AbstractDoubleExceptionTests#getException( - * java.lang.String, java.lang.RuntimeException, java.lang.Throwable) - */ @Override public Exception getException(String msg, Throwable e) throws Exception { return new ForceRollbackForWriteSkipException(msg, e); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/step/skip/NonSkippableReadExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/step/skip/NonSkippableReadExceptionTests.java index d7e0e5f76..bf23c2ae2 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/step/skip/NonSkippableReadExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/step/skip/NonSkippableReadExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,13 +23,6 @@ import org.springframework.batch.core.AbstractExceptionWithCauseTests; */ public class NonSkippableReadExceptionTests extends AbstractExceptionWithCauseTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.listener.AbstractDoubleExceptionTests#getException( - * java.lang.String, java.lang.RuntimeException, java.lang.Throwable) - */ @Override public Exception getException(String msg, Throwable e) throws Exception { return new NonSkippableReadException(msg, e); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/step/skip/NonSkippableWriteExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/step/skip/NonSkippableWriteExceptionTests.java index 4ec6c2cf9..961d76a63 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/step/skip/NonSkippableWriteExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/step/skip/NonSkippableWriteExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,13 +23,6 @@ import org.springframework.batch.core.AbstractExceptionWithCauseTests; */ public class NonSkippableWriteExceptionTests extends AbstractExceptionWithCauseTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.listener.AbstractDoubleExceptionTests#getException( - * java.lang.String, java.lang.RuntimeException, java.lang.Throwable) - */ @Override public Exception getException(String msg, Throwable e) throws Exception { return new NonSkippableWriteException(msg, e); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/step/skip/SkipListenerFailedExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/step/skip/SkipListenerFailedExceptionTests.java index 29f8326c9..4a454edd7 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/step/skip/SkipListenerFailedExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/step/skip/SkipListenerFailedExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,13 +23,6 @@ import org.springframework.batch.core.listener.AbstractDoubleExceptionTests; */ public class SkipListenerFailedExceptionTests extends AbstractDoubleExceptionTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.listener.AbstractDoubleExceptionTests#getException( - * java.lang.String, java.lang.RuntimeException, java.lang.Throwable) - */ @Override public Exception getException(String msg, RuntimeException cause, Throwable e) throws Exception { return new SkipListenerFailedException(msg, cause, e); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/step/skip/SkipPolicyFailedExceptionTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/step/skip/SkipPolicyFailedExceptionTests.java index f37562158..db997cc1f 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/step/skip/SkipPolicyFailedExceptionTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/step/skip/SkipPolicyFailedExceptionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,13 +23,6 @@ import org.springframework.batch.core.listener.AbstractDoubleExceptionTests; */ public class SkipPolicyFailedExceptionTests extends AbstractDoubleExceptionTests { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.listener.AbstractDoubleExceptionTests#getException( - * java.lang.String, java.lang.RuntimeException, java.lang.Throwable) - */ @Override public Exception getException(String msg, RuntimeException cause, Throwable e) throws Exception { return new SkipPolicyFailedException(msg, cause, e); diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/test/football/internal/PlayerSummaryMapper.java b/spring-batch-core/src/test/java/org/springframework/batch/core/test/football/internal/PlayerSummaryMapper.java index 903897ed8..a05503984 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/test/football/internal/PlayerSummaryMapper.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/test/football/internal/PlayerSummaryMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2019 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,11 +31,6 @@ import org.springframework.jdbc.core.RowMapper; */ public class PlayerSummaryMapper implements RowMapper { - /* - * (non-Javadoc) - * - * @see org.springframework.jdbc.core.RowMapper#mapRow(java.sql.ResultSet, int) - */ @Override public PlayerSummary mapRow(ResultSet rs, int rowNum) throws SQLException { diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/test/football/internal/PlayerSummaryRowMapper.java b/spring-batch-core/src/test/java/org/springframework/batch/core/test/football/internal/PlayerSummaryRowMapper.java index 743a43df4..8f6f413ba 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/test/football/internal/PlayerSummaryRowMapper.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/test/football/internal/PlayerSummaryRowMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2019 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,11 +31,6 @@ import org.springframework.jdbc.core.RowMapper; */ public class PlayerSummaryRowMapper implements RowMapper { - /* - * (non-Javadoc) - * - * @see org.springframework.jdbc.core.RowMapper#mapRow(java.sql.ResultSet, int) - */ @Override public PlayerSummary mapRow(ResultSet rs, int rowNum) throws SQLException { diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/test/ldif/MyMapper.java b/spring-batch-core/src/test/java/org/springframework/batch/core/test/ldif/MyMapper.java index cf0a9dd68..ef5ca6181 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/test/ldif/MyMapper.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/test/ldif/MyMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2005-2019 the original author or authors. + * Copyright 2005-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ import org.springframework.ldap.core.LdapAttributes; */ public class MyMapper implements RecordMapper { + @Override @Nullable public LdapAttributes mapRecord(LdapAttributes attributes) { return attributes; diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/test/repository/JobSupport.java b/spring-batch-core/src/test/java/org/springframework/batch/core/test/repository/JobSupport.java index 0ba57e895..78ca3ff80 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/test/repository/JobSupport.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/test/repository/JobSupport.java @@ -21,13 +21,11 @@ import java.util.List; import org.springframework.batch.core.Job; import org.springframework.batch.core.JobExecution; -import org.springframework.batch.core.JobParametersIncrementer; import org.springframework.batch.core.JobParametersValidator; import org.springframework.batch.core.Step; import org.springframework.batch.core.UnexpectedJobExecutionException; import org.springframework.batch.core.job.DefaultJobParametersValidator; import org.springframework.beans.factory.BeanNameAware; -import org.springframework.lang.Nullable; import org.springframework.util.ClassUtils; /** @@ -46,8 +44,6 @@ public class JobSupport implements BeanNameAware, Job { private boolean restartable = false; - private int startLimit = Integer.MAX_VALUE; - private JobParametersValidator jobParametersValidator = new DefaultJobParametersValidator(); /** @@ -93,11 +89,6 @@ public class JobSupport implements BeanNameAware, Job { this.name = name; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.domain.IJob#getName() - */ @Override public String getName() { return name; @@ -123,56 +114,20 @@ public class JobSupport implements BeanNameAware, Job { return steps; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.domain.IJob#getStartLimit() - */ - public int getStartLimit() { - return startLimit; - } - - public void setStartLimit(int startLimit) { - this.startLimit = startLimit; - } - public void setRestartable(boolean restartable) { this.restartable = restartable; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.domain.IJob#isRestartable() - */ @Override public boolean isRestartable() { return restartable; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.Job#getJobParametersIncrementer() - */ - @Nullable - @Override - public JobParametersIncrementer getJobParametersIncrementer() { - return null; - } - @Override public JobParametersValidator getJobParametersValidator() { return jobParametersValidator; } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.domain.Job#run(org.springframework.batch.core.domain - * .JobExecution) - */ @Override public void execute(JobExecution execution) throws UnexpectedJobExecutionException { throw new UnsupportedOperationException( diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/Chunk.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/Chunk.java index 4cdfa1c7e..dd39b70e7 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/Chunk.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/Chunk.java @@ -201,11 +201,6 @@ public class Chunk implements Iterable, Serializable { this.userData = userData; } - /* - * (non-Javadoc) - * - * @see java.lang.Object#toString() - */ @Override public String toString() { return String.format("[items=%s, skips=%s]", items, skips); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ExecutionContext.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ExecutionContext.java index 34bf349da..71e56ce4d 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ExecutionContext.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ExecutionContext.java @@ -385,11 +385,6 @@ public class ExecutionContext implements Serializable { return this.map.containsValue(value); } - /* - * (non-Javadoc) - * - * @see java.lang.Object#equals(java.lang.Object) - */ @Override public boolean equals(Object obj) { if (!(obj instanceof ExecutionContext rhs)) { @@ -401,21 +396,11 @@ public class ExecutionContext implements Serializable { return this.entrySet().equals(rhs.entrySet()); } - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ @Override public int hashCode() { return this.map.hashCode(); } - /* - * (non-Javadoc) - * - * @see java.lang.Object#toString() - */ @Override public String toString() { return this.map.toString(); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/KeyValueItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/KeyValueItemWriter.java index 52c42a42a..6354fb135 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/KeyValueItemWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/KeyValueItemWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -31,11 +31,6 @@ public abstract class KeyValueItemWriter implements ItemWriter, Initial protected boolean delete; - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.ItemWriter#write(java.util.List) - */ @Override public void write(Chunk items) throws Exception { if (items == null) { @@ -84,11 +79,6 @@ public abstract class KeyValueItemWriter implements ItemWriter, Initial this.delete = delete; } - /* - * (non-Javadoc) - * - * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() - */ @Override public void afterPropertiesSet() throws Exception { Assert.state(itemKeyMapper != null, "itemKeyMapper requires a Converter type."); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/SpELItemKeyMapper.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/SpELItemKeyMapper.java index a4bb6ba18..13c4f4953 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/SpELItemKeyMapper.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/SpELItemKeyMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2013 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at @@ -33,11 +33,6 @@ public class SpELItemKeyMapper implements Converter { parsedExpression = parser.parseExpression(keyExpression); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.ItemKeyMapper#mapKey(java.lang.Object) - */ @SuppressWarnings("unchecked") @Override public K convert(V item) { diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/ExtendedConnectionDataSourceProxy.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/ExtendedConnectionDataSourceProxy.java index 18f8a968a..fad274bcf 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/ExtendedConnectionDataSourceProxy.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/ExtendedConnectionDataSourceProxy.java @@ -345,6 +345,7 @@ public class ExtendedConnectionDataSourceProxy implements SmartDataSource, Initi /** * Added due to JDK 7 compatibility. */ + @Override public Logger getParentLogger() throws SQLFeatureNotSupportedException { MethodInvoker invoker = new MethodInvoker(); invoker.setTargetObject(dataSource); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java index 9b4b00bfd..be5d04eeb 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/JdbcBatchItemWriter.java @@ -156,11 +156,6 @@ public class JdbcBatchItemWriter implements ItemWriter, InitializingBean { } } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.ItemWriter#write(java.util.List) - */ @SuppressWarnings("unchecked") @Override public void write(final Chunk chunk) throws Exception { diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/SqliteMaxValueIncrementer.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/SqliteMaxValueIncrementer.java index bc0b3ea22..fb3ee9a4e 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/SqliteMaxValueIncrementer.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/SqliteMaxValueIncrementer.java @@ -1,5 +1,5 @@ /* - * Copyright 2014 the original author or authors. + * Copyright 2014-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,13 +40,6 @@ class SqliteMaxValueIncrementer extends AbstractColumnMaxValueIncrementer { super(dataSource, incrementerName, columnName); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.jdbc.support.incrementer.AbstractDataFieldMaxValueIncrementer# - * getNextKey() - */ @Override protected long getNextKey() { Connection con = DataSourceUtils.getConnection(getDataSource()); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/SqlitePagingQueryProvider.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/SqlitePagingQueryProvider.java index 7f2699f17..cc44ef6a4 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/SqlitePagingQueryProvider.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/database/support/SqlitePagingQueryProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2014-2022 the original author or authors. + * Copyright 2014-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,25 +29,11 @@ import org.springframework.util.StringUtils; */ public class SqlitePagingQueryProvider extends AbstractSqlPagingQueryProvider { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.item.database.support.AbstractSqlPagingQueryProvider# - * generateFirstPageQuery(int) - */ @Override public String generateFirstPageQuery(int pageSize) { return SqlPagingQueryUtils.generateLimitSqlQuery(this, false, buildLimitClause(pageSize)); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.item.database.support.AbstractSqlPagingQueryProvider# - * generateRemainingPagesQuery(int) - */ @Override public String generateRemainingPagesQuery(int pageSize) { if (StringUtils.hasText(getGroupClause())) { diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/BeanWrapperFieldSetMapper.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/BeanWrapperFieldSetMapper.java index 0a4ecdaef..1364f7144 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/BeanWrapperFieldSetMapper.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/BeanWrapperFieldSetMapper.java @@ -109,12 +109,6 @@ public class BeanWrapperFieldSetMapper extends DefaultPropertyEditorRegistrar private boolean isCustomEditorsSet; - /* - * (non-Javadoc) - * - * @see org.springframework.beans.factory.BeanFactoryAware#setBeanFactory(org - * .springframework.beans.factory.BeanFactory) - */ @Override public void setBeanFactory(BeanFactory beanFactory) { this.beanFactory = beanFactory; diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/PassThroughFieldSetMapper.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/PassThroughFieldSetMapper.java index 816e5bc9e..d83572f53 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/PassThroughFieldSetMapper.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/PassThroughFieldSetMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,12 +26,6 @@ import org.springframework.batch.item.file.transform.FieldSet; */ public class PassThroughFieldSetMapper implements FieldSetMapper
{ - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.FieldSetMapper#mapLine(org.springframework - * .batch.io.file.FieldSet) - */ @Override public FieldSet mapFieldSet(FieldSet fs) { return fs; diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/PatternMatchingCompositeLineMapper.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/PatternMatchingCompositeLineMapper.java index def6a6a90..ef9124035 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/PatternMatchingCompositeLineMapper.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/mapping/PatternMatchingCompositeLineMapper.java @@ -50,22 +50,11 @@ public class PatternMatchingCompositeLineMapper implements LineMapper, Ini private PatternMatcher> patternMatcher; - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.LineMapper#mapLine(java.lang - * .String, int) - */ @Override public T mapLine(String line, int lineNumber) throws Exception { return patternMatcher.match(line).mapFieldSet(this.tokenizer.tokenize(line)); } - /* - * (non-Javadoc) - * - * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() - */ @Override public void afterPropertiesSet() throws Exception { this.tokenizer.afterPropertiesSet(); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/DefaultFieldSet.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/DefaultFieldSet.java index 4ec95e4d5..9214291e0 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/DefaultFieldSet.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/DefaultFieldSet.java @@ -116,11 +116,6 @@ public class DefaultFieldSet implements FieldSet { setNumberFormat(NumberFormat.getInstance(Locale.US)); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#getNames() - */ @Override public String[] getNames() { if (names == null) { @@ -129,95 +124,46 @@ public class DefaultFieldSet implements FieldSet { return names.toArray(new String[0]); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.FieldSet#hasNames() - */ @Override public boolean hasNames() { return names != null; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#getValues() - */ @Override public String[] getValues() { return tokens.clone(); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readString(int) - */ @Override public String readString(int index) { return readAndTrim(index); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readString(java - * .lang.String) - */ @Override public String readString(String name) { return readString(indexOf(name)); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readRawString(int) - */ @Override public String readRawString(int index) { return tokens[index]; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readRawString(java - * .lang.String) - */ @Override public String readRawString(String name) { return readRawString(indexOf(name)); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readBoolean(int) - */ @Override public boolean readBoolean(int index) { return readBoolean(index, "true"); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readBoolean(java - * .lang.String) - */ @Override public boolean readBoolean(String name) { return readBoolean(indexOf(name)); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readBoolean(int, - * java.lang.String) - */ @Override public boolean readBoolean(int index, String trueValue) { Assert.notNull(trueValue, "'trueValue' cannot be null."); @@ -227,22 +173,11 @@ public class DefaultFieldSet implements FieldSet { return trueValue.equals(value); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readBoolean(java - * .lang.String, java.lang.String) - */ @Override public boolean readBoolean(String name, String trueValue) { return readBoolean(indexOf(name), trueValue); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readChar(int) - */ @Override public char readChar(int index) { String value = readAndTrim(index); @@ -252,85 +187,41 @@ public class DefaultFieldSet implements FieldSet { return value.charAt(0); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readChar(java.lang - * .String) - */ @Override public char readChar(String name) { return readChar(indexOf(name)); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readByte(int) - */ @Override public byte readByte(int index) { return Byte.parseByte(readAndTrim(index)); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readByte(java.lang - * .String) - */ @Override public byte readByte(String name) { return readByte(indexOf(name)); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readShort(int) - */ @Override public short readShort(int index) { return Short.parseShort(readAndTrim(index)); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readShort(java. - * lang.String) - */ @Override public short readShort(String name) { return readShort(indexOf(name)); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readInt(int) - */ @Override public int readInt(int index) { return parseNumber(readAndTrim(index)).intValue(); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readInt(java.lang - * .String) - */ @Override public int readInt(String name) { return readInt(indexOf(name)); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readInt(int, int) - */ @Override public int readInt(int index, int defaultValue) { String value = readAndTrim(index); @@ -338,43 +229,21 @@ public class DefaultFieldSet implements FieldSet { return StringUtils.hasLength(value) ? Integer.parseInt(value) : defaultValue; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readInt(java.lang - * .String, int) - */ @Override public int readInt(String name, int defaultValue) { return readInt(indexOf(name), defaultValue); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readLong(int) - */ @Override public long readLong(int index) { return parseNumber(readAndTrim(index)).longValue(); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readLong(java.lang - * .String) - */ @Override public long readLong(String name) { return readLong(indexOf(name)); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readLong(int, long) - */ @Override public long readLong(int index, long defaultValue) { String value = readAndTrim(index); @@ -382,86 +251,41 @@ public class DefaultFieldSet implements FieldSet { return StringUtils.hasLength(value) ? Long.parseLong(value) : defaultValue; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readLong(java.lang - * .String, long) - */ @Override public long readLong(String name, long defaultValue) { return readLong(indexOf(name), defaultValue); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readFloat(int) - */ @Override public float readFloat(int index) { return parseNumber(readAndTrim(index)).floatValue(); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readFloat(java. - * lang.String) - */ @Override public float readFloat(String name) { return readFloat(indexOf(name)); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readDouble(int) - */ @Override public double readDouble(int index) { return parseNumber(readAndTrim(index)).doubleValue(); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readDouble(java - * .lang.String) - */ @Override public double readDouble(String name) { return readDouble(indexOf(name)); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readBigDecimal(int) - */ @Override public BigDecimal readBigDecimal(int index) { return readBigDecimal(index, null); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readBigDecimal( - * java.lang.String) - */ @Override public BigDecimal readBigDecimal(String name) { return readBigDecimal(name, null); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readBigDecimal(int, - * java.math.BigDecimal) - */ @Override public BigDecimal readBigDecimal(int index, BigDecimal defaultValue) { String candidate = readAndTrim(index); @@ -483,12 +307,6 @@ public class DefaultFieldSet implements FieldSet { return candidate.replace(grouping, "").replace(decimal, "."); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readBigDecimal( - * java.lang.String, java.math.BigDecimal) - */ @Override public BigDecimal readBigDecimal(String name, BigDecimal defaultValue) { try { @@ -502,34 +320,17 @@ public class DefaultFieldSet implements FieldSet { } } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readDate(int) - */ @Override public Date readDate(int index) { return parseDate(readAndTrim(index), dateFormat); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.transform.FieldSet#readDate(int, - * java.util.Date) - */ @Override public Date readDate(int index, Date defaultValue) { String candidate = readAndTrim(index); return StringUtils.hasText(candidate) ? parseDate(candidate, dateFormat) : defaultValue; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readDate(java.lang - * .String) - */ @Override public Date readDate(String name) { try { @@ -540,12 +341,6 @@ public class DefaultFieldSet implements FieldSet { } } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.transform.FieldSet#readDate(int, - * java.util.Date) - */ @Override public Date readDate(String name, Date defaultValue) { try { @@ -556,12 +351,6 @@ public class DefaultFieldSet implements FieldSet { } } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readDate(int, - * java.lang.String) - */ @Override public Date readDate(int index, String pattern) { SimpleDateFormat sdf = new SimpleDateFormat(pattern); @@ -569,24 +358,12 @@ public class DefaultFieldSet implements FieldSet { return parseDate(readAndTrim(index), sdf); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readDate(int, - * java.lang.String) - */ @Override public Date readDate(int index, String pattern, Date defaultValue) { String candidate = readAndTrim(index); return StringUtils.hasText(candidate) ? readDate(index, pattern) : defaultValue; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readDate(java.lang - * .String, java.lang.String) - */ @Override public Date readDate(String name, String pattern) { try { @@ -597,12 +374,6 @@ public class DefaultFieldSet implements FieldSet { } } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#readDate(int, - * java.lang.String) - */ @Override public Date readDate(String name, String pattern, Date defaultValue) { try { @@ -613,11 +384,6 @@ public class DefaultFieldSet implements FieldSet { } } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#getFieldCount() - */ @Override public int getFieldCount() { return tokens.length; @@ -701,11 +467,6 @@ public class DefaultFieldSet implements FieldSet { return result; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.mapping.IFieldSet#getProperties() - */ @Override public Properties getProperties() { if (names == null) { diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/IncorrectTokenCountException.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/IncorrectTokenCountException.java index 19ea254c5..387994814 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/IncorrectTokenCountException.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/IncorrectTokenCountException.java @@ -70,6 +70,7 @@ public class IncorrectTokenCountException extends FlatFileFormatException { * @return the line that caused the exception * @since 2.2.6 */ + @Override public String getInput() { return input; } diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/PatternMatchingCompositeLineTokenizer.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/PatternMatchingCompositeLineTokenizer.java index 54a061e7f..eff7d28f6 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/PatternMatchingCompositeLineTokenizer.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/PatternMatchingCompositeLineTokenizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2022 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -38,22 +38,11 @@ public class PatternMatchingCompositeLineTokenizer implements LineTokenizer, Ini private PatternMatcher tokenizers = null; - /* - * (non-Javadoc) - * - * @see org.springframework.batch.item.file.transform.LineTokenizer#tokenize( - * java.lang.String) - */ @Override public FieldSet tokenize(@Nullable String line) { return tokenizers.match(line).tokenize(line); } - /* - * (non-Javadoc) - * - * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() - */ @Override public void afterPropertiesSet() throws Exception { Assert.state(this.tokenizers != null, "The 'tokenizers' property must be non-empty"); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/RecursiveCollectionLineAggregator.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/RecursiveCollectionLineAggregator.java index 8918e736e..b5c7fa8ef 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/RecursiveCollectionLineAggregator.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/file/transform/RecursiveCollectionLineAggregator.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -41,13 +41,6 @@ public class RecursiveCollectionLineAggregator implements LineAggregator items) { StringBuilder builder = new StringBuilder(); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ldif/LdifReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ldif/LdifReader.java index 7c16ceceb..d80508b0d 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ldif/LdifReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/ldif/LdifReader.java @@ -174,11 +174,13 @@ public class LdifReader extends AbstractItemCountingItemStreamItemReader extends AbstractItemCountingItemStreamItemRead } } + @Override public void setResource(Resource resource) { this.resource = resource; this.ldifParser = new LdifParser(resource); } + @Override public void afterPropertiesSet() throws Exception { Assert.state(resource != null, "A resource is required to parse."); Assert.state(ldifParser != null, "A parser is required"); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/SynchronizedItemReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/SynchronizedItemReader.java index 2c711aece..69655a50e 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/SynchronizedItemReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/SynchronizedItemReader.java @@ -46,6 +46,7 @@ public class SynchronizedItemReader implements ItemReader { * This method delegates to the {@code read} method of the delegate and is * synchronized with a lock. */ + @Override @Nullable public T read() throws Exception { this.lock.lock(); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/SynchronizedItemStreamReader.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/SynchronizedItemStreamReader.java index 8cc1322d8..3affd83e0 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/SynchronizedItemStreamReader.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/support/SynchronizedItemStreamReader.java @@ -55,6 +55,7 @@ public class SynchronizedItemStreamReader implements ItemStreamReader, Ini /** * This delegates to the read method of the delegate */ + @Override @Nullable public T read() throws Exception { this.lock.lock(); @@ -66,14 +67,17 @@ public class SynchronizedItemStreamReader implements ItemStreamReader, Ini } } + @Override public void close() { this.delegate.close(); } + @Override public void open(ExecutionContext executionContext) { this.delegate.open(executionContext); } + @Override public void update(ExecutionContext executionContext) { this.delegate.update(executionContext); } diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/stax/UnclosedElementCollectingEventWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/stax/UnclosedElementCollectingEventWriter.java index 3f8cbe45d..294376161 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/stax/UnclosedElementCollectingEventWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/stax/UnclosedElementCollectingEventWriter.java @@ -40,13 +40,6 @@ public class UnclosedElementCollectingEventWriter extends AbstractEventWriterWra super(wrappedEventWriter); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.item.xml.stax.AbstractEventWriterWrapper#add(javax.xml. - * stream.events.XMLEvent) - */ @Override public void add(XMLEvent event) throws XMLStreamException { if (event.isStartElement()) { diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/stax/UnopenedElementClosingEventWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/stax/UnopenedElementClosingEventWriter.java index 95b109b9a..11d504f6f 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/stax/UnopenedElementClosingEventWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/xml/stax/UnopenedElementClosingEventWriter.java @@ -50,13 +50,6 @@ public class UnopenedElementClosingEventWriter extends AbstractEventWriterWrappe this.ioWriter = ioWriter; } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.item.xml.stax.AbstractEventWriterWrapper#add(javax.xml. - * stream.events.XMLEvent) - */ @Override public void add(XMLEvent event) throws XMLStreamException { if (isUnopenedElementCloseEvent(event)) { diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/context/RepeatContextSupport.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/context/RepeatContextSupport.java index 63699a906..ac80aa0a6 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/context/RepeatContextSupport.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/context/RepeatContextSupport.java @@ -48,52 +48,27 @@ public class RepeatContextSupport extends SynchronizedAttributeAccessor implemen this.parent = parent; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.repeat.RepeatContext#isCompleteOnly() - */ @Override public boolean isCompleteOnly() { return completeOnly; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.repeat.RepeatContext#setCompleteOnly() - */ @Override public void setCompleteOnly() { completeOnly = true; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.repeat.RepeatContext#isTerminateOnly() - */ @Override public boolean isTerminateOnly() { return terminateOnly; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.repeat.RepeatContext#setTerminateOnly() - */ @Override public void setTerminateOnly() { terminateOnly = true; setCompleteOnly(); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.repeat.RepeatContext#getParent() - */ @Override public RepeatContext getParent() { return parent; @@ -106,22 +81,11 @@ public class RepeatContextSupport extends SynchronizedAttributeAccessor implemen count++; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.repeat.RepeatContext#getStartedCount() - */ @Override public synchronized int getStartedCount() { return count; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.repeat.RepeatContext#registerDestructionCallback - * (java.lang.String, java.lang.Runnable) - */ @Override public void registerDestructionCallback(String name, Runnable callback) { synchronized (callbacks) { @@ -130,11 +94,6 @@ public class RepeatContextSupport extends SynchronizedAttributeAccessor implemen } } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.repeat.RepeatContext#close() - */ @Override public void close() { diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/context/SynchronizedAttributeAccessor.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/context/SynchronizedAttributeAccessor.java index 51f1bd1a5..af6bbe8c3 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/context/SynchronizedAttributeAccessor.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/context/SynchronizedAttributeAccessor.java @@ -40,11 +40,6 @@ public class SynchronizedAttributeAccessor implements AttributeAccessor { }; - /* - * (non-Javadoc) - * - * @see org.springframework.core.AttributeAccessor#attributeNames() - */ @Override public String[] attributeNames() { synchronized (support) { @@ -52,11 +47,6 @@ public class SynchronizedAttributeAccessor implements AttributeAccessor { } } - /* - * (non-Javadoc) - * - * @see java.lang.Object#equals(java.lang.Object) - */ @Override public boolean equals(Object other) { if (this == other) { @@ -77,11 +67,6 @@ public class SynchronizedAttributeAccessor implements AttributeAccessor { } } - /* - * (non-Javadoc) - * - * @see org.springframework.core.AttributeAccessor#getAttribute(java.lang.String) - */ @Override public Object getAttribute(String name) { synchronized (support) { @@ -89,11 +74,6 @@ public class SynchronizedAttributeAccessor implements AttributeAccessor { } } - /* - * (non-Javadoc) - * - * @see org.springframework.core.AttributeAccessor#hasAttribute(java.lang.String) - */ @Override public boolean hasAttribute(String name) { synchronized (support) { @@ -101,21 +81,11 @@ public class SynchronizedAttributeAccessor implements AttributeAccessor { } } - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ @Override public int hashCode() { return support.hashCode(); } - /* - * (non-Javadoc) - * - * @see org.springframework.core.AttributeAccessor#removeAttribute(java.lang.String) - */ @Override public Object removeAttribute(String name) { synchronized (support) { @@ -123,12 +93,6 @@ public class SynchronizedAttributeAccessor implements AttributeAccessor { } } - /* - * (non-Javadoc) - * - * @see org.springframework.core.AttributeAccessor#setAttribute(java.lang.String, - * java.lang.Object) - */ @Override public void setAttribute(String name, Object value) { synchronized (support) { @@ -154,11 +118,6 @@ public class SynchronizedAttributeAccessor implements AttributeAccessor { return null; } - /* - * (non-Javadoc) - * - * @see java.lang.Object#toString() - */ @Override public String toString() { StringBuilder buffer = new StringBuilder("SynchronizedAttributeAccessor: ["); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/exception/RethrowOnThresholdExceptionHandler.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/exception/RethrowOnThresholdExceptionHandler.java index a97867adf..134da060d 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/exception/RethrowOnThresholdExceptionHandler.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/exception/RethrowOnThresholdExceptionHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -127,11 +127,6 @@ public class RethrowOnThresholdExceptionHandler implements ExceptionHandler { return value; } - /* - * (non-Javadoc) - * - * @see java.lang.Object#toString() - */ @Override public String toString() { return ObjectUtils.getIdentityHexString(this) + "." + value; diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/listener/CompositeRepeatListener.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/listener/CompositeRepeatListener.java index 91b2d008e..11867777b 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/listener/CompositeRepeatListener.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/listener/CompositeRepeatListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2022 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -87,13 +87,6 @@ public class CompositeRepeatListener implements RepeatListener { } } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.repeat.RepeatListener#after(org.springframework.batch. - * repeat.RepeatContext, org.springframework.batch.repeat.ExitStatus) - */ @Override public void after(RepeatContext context, RepeatStatus result) { for (RepeatListener listener : listeners) { @@ -101,13 +94,6 @@ public class CompositeRepeatListener implements RepeatListener { } } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.repeat.RepeatListener#before(org.springframework.batch. - * repeat.RepeatContext) - */ @Override public void before(RepeatContext context) { for (RepeatListener listener : listeners) { @@ -115,13 +101,6 @@ public class CompositeRepeatListener implements RepeatListener { } } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.repeat.RepeatListener#close(org.springframework.batch. - * repeat.RepeatContext) - */ @Override public void close(RepeatContext context) { for (RepeatListener listener : listeners) { @@ -129,13 +108,6 @@ public class CompositeRepeatListener implements RepeatListener { } } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.repeat.RepeatListener#onError(org.springframework.batch. - * repeat.RepeatContext, java.lang.Throwable) - */ @Override public void onError(RepeatContext context, Throwable e) { for (RepeatListener listener : listeners) { @@ -143,13 +115,6 @@ public class CompositeRepeatListener implements RepeatListener { } } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.repeat.RepeatListener#open(org.springframework.batch. - * repeat.RepeatContext) - */ @Override public void open(RepeatContext context) { for (RepeatListener listener : listeners) { diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/policy/CountingCompletionPolicy.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/policy/CountingCompletionPolicy.java index 17fd2f838..3d7f88bc1 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/policy/CountingCompletionPolicy.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/policy/CountingCompletionPolicy.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -81,36 +81,17 @@ public abstract class CountingCompletionPolicy extends DefaultResultCompletionPo return 0; } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.repeat.policy.CompletionPolicySupport#isComplete(org. - * springframework.batch.repeat.BatchContext) - */ @Override final public boolean isComplete(RepeatContext context) { int count = ((CountingBatchContext) context).getCounter().getCount(); return count >= maxCount; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.repeat.policy.CompletionPolicySupport#start(org. - * springframework.batch.repeat.BatchContext) - */ @Override public RepeatContext start(RepeatContext parent) { return new CountingBatchContext(parent); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.repeat.policy.CompletionPolicySupport#update(org. - * springframework.batch.repeat.BatchContext) - */ @Override final public void update(RepeatContext context) { super.update(context); diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/policy/SimpleCompletionPolicy.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/policy/SimpleCompletionPolicy.java index 896173672..854af0943 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/policy/SimpleCompletionPolicy.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/policy/SimpleCompletionPolicy.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -114,11 +114,6 @@ public class SimpleCompletionPolicy extends DefaultResultCompletionPolicy { } - /* - * (non-Javadoc) - * - * @see java.lang.Object#toString() - */ @Override public String toString() { return ClassUtils.getShortName(SimpleCompletionPolicy.class) + ": chunkSize=" + chunkSize; diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/RepeatInternalStateSupport.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/RepeatInternalStateSupport.java index 162e1c87f..763d1fe98 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/RepeatInternalStateSupport.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/RepeatInternalStateSupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,11 +25,6 @@ public class RepeatInternalStateSupport implements RepeatInternalState { // Accumulation of failed results. private final Set throwables = new HashSet<>(); - /* - * (non-Javadoc) - * - * @see org.springframework.batch.repeat.support.BatchInternalState#getThrowables() - */ @Override public Collection getThrowables() { return throwables; diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ResultHolderResultQueue.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ResultHolderResultQueue.java index b42dbdbaf..73ccc43c5 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ResultHolderResultQueue.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ResultHolderResultQueue.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -59,11 +59,6 @@ public class ResultHolderResultQueue implements ResultQueue { return results.isEmpty(); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.repeat.support.ResultQueue#isExpecting() - */ @Override public boolean isExpecting() { // Base the decision about whether we expect more results on a diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ThrottleLimitResultQueue.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ThrottleLimitResultQueue.java index 4d73bda59..0fd0c215c 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ThrottleLimitResultQueue.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/repeat/support/ThrottleLimitResultQueue.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2022 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -56,11 +56,6 @@ public class ThrottleLimitResultQueue implements ResultQueue { return results.isEmpty(); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.repeat.support.ResultQueue#isExpecting() - */ @Override public boolean isExpecting() { // Base the decision about whether we expect more results on a diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/support/SimpleMethodInvoker.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/support/SimpleMethodInvoker.java index 04182354b..a7d085623 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/support/SimpleMethodInvoker.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/support/SimpleMethodInvoker.java @@ -76,12 +76,6 @@ public class SimpleMethodInvoker implements MethodInvoker { this.object = object; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.configuration.util.MethodInvoker#invokeMethod - * (java.lang.Object[]) - */ @Nullable @Override public Object invokeMethod(Object... args) { diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/support/transaction/TransactionAwareBufferedWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/support/transaction/TransactionAwareBufferedWriter.java index c67c4e4f0..808e07366 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/support/transaction/TransactionAwareBufferedWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/support/transaction/TransactionAwareBufferedWriter.java @@ -172,11 +172,6 @@ public class TransactionAwareBufferedWriter extends Writer { return TransactionSynchronizationManager.isActualTransactionActive(); } - /* - * (non-Javadoc) - * - * @see java.io.Writer#close() - */ @Override public void close() throws IOException { if (transactionActive()) { @@ -188,11 +183,6 @@ public class TransactionAwareBufferedWriter extends Writer { closeCallback.run(); } - /* - * (non-Javadoc) - * - * @see java.io.Writer#flush() - */ @Override public void flush() throws IOException { if (!transactionActive() && forceSync) { @@ -200,11 +190,6 @@ public class TransactionAwareBufferedWriter extends Writer { } } - /* - * (non-Javadoc) - * - * @see java.io.Writer#write(char[], int, int) - */ @Override public void write(char[] cbuf, int off, int len) throws IOException { @@ -224,11 +209,6 @@ public class TransactionAwareBufferedWriter extends Writer { buffer.append(cbuf, off, len); } - /* - * (non-Javadoc) - * - * @see java.io.Writer#write(String, int, int) - */ @Override public void write(String str, int off, int len) throws IOException { diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/CompositeKeyFooDao.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/CompositeKeyFooDao.java index c0d8b4005..ed8327018 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/CompositeKeyFooDao.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/CompositeKeyFooDao.java @@ -34,11 +34,6 @@ public class CompositeKeyFooDao extends JdbcDaoSupport implements FooDao { this.setDataSource(dataSource); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.io.sql.scratch.FooDao#getFoo(java.lang.Object) - */ @Override public Foo getFoo(Object key) { diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/ExtendedConnectionDataSourceProxyTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/ExtendedConnectionDataSourceProxyTests.java index dc362b28c..3b83e488c 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/ExtendedConnectionDataSourceProxyTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/item/database/ExtendedConnectionDataSourceProxyTests.java @@ -327,6 +327,7 @@ class ExtendedConnectionDataSourceProxyTests { /** * Added due to JDK 7. */ + @Override @SuppressWarnings("unused") public Logger getParentLogger() throws SQLFeatureNotSupportedException { throw new SQLFeatureNotSupportedException(); diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/repeat/support/ItemReaderRepeatCallback.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/repeat/support/ItemReaderRepeatCallback.java index 2fc2035b8..8df982643 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/repeat/support/ItemReaderRepeatCallback.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/repeat/support/ItemReaderRepeatCallback.java @@ -38,13 +38,6 @@ public class ItemReaderRepeatCallback implements RepeatCallback { this.reader = reader; } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.repeat.RepeatCallback#doInIteration(org.springframework. - * batch.repeat.RepeatContext) - */ @Override public RepeatStatus doInIteration(RepeatContext context) throws Exception { T item = reader.read(); diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/ReflectionUtilsTests.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/ReflectionUtilsTests.java index 6e1a5746a..da24ab413 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/ReflectionUtilsTests.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/ReflectionUtilsTests.java @@ -82,6 +82,7 @@ class ReflectionUtilsTests { public void methodOne() { } + @Override @Transactional public String toString() { return "AnnotatedClass"; @@ -91,6 +92,7 @@ class ReflectionUtilsTests { public static class AnnotatedSubClass extends AnnotatedClass { + @Override @Transactional public void methodOne() { } diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/AsyncItemProcessor.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/AsyncItemProcessor.java index 4c737c637..d6667974d 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/AsyncItemProcessor.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/AsyncItemProcessor.java @@ -59,6 +59,7 @@ public class AsyncItemProcessor implements ItemProcessor>, In * * @see InitializingBean#afterPropertiesSet() */ + @Override public void afterPropertiesSet() throws Exception { Assert.state(delegate != null, "The delegate must be set."); } @@ -87,6 +88,7 @@ public class AsyncItemProcessor implements ItemProcessor>, In * * @see ItemProcessor#process(Object) */ + @Override @Nullable public Future process(final I item) throws Exception { final StepExecution stepExecution = getStepExecution(); diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/AsyncItemWriter.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/AsyncItemWriter.java index 1d69d4d18..58e9e9086 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/AsyncItemWriter.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/async/AsyncItemWriter.java @@ -38,6 +38,7 @@ public class AsyncItemWriter implements ItemStreamWriter>, Initiali private ItemWriter delegate; + @Override public void afterPropertiesSet() throws Exception { Assert.state(delegate != null, "A delegate ItemWriter must be provided."); } @@ -60,6 +61,7 @@ public class AsyncItemWriter implements ItemStreamWriter>, Initiali * delegate * @throws Exception The exception returned by the Future if one was thrown */ + @Override public void write(Chunk> items) throws Exception { List list = new ArrayList<>(); for (Future future : items) { diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkMessageChannelItemWriter.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkMessageChannelItemWriter.java index 904e6ad0a..4475e2d1a 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkMessageChannelItemWriter.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkMessageChannelItemWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2022 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -93,6 +93,7 @@ public class ChunkMessageChannelItemWriter this.replyChannel = replyChannel; } + @Override public void write(Chunk items) throws Exception { // Block until expecting <= throttle limit @@ -155,10 +156,12 @@ public class ChunkMessageChannelItemWriter return ExitStatus.COMPLETED.addExitDescription("Waited for " + expecting + " results."); } + @Override public void close() throws ItemStreamException { localState.reset(); } + @Override public void open(ExecutionContext executionContext) throws ItemStreamException { if (executionContext.containsKey(EXPECTED)) { localState.open(executionContext.getInt(EXPECTED), executionContext.getInt(ACTUAL)); @@ -168,11 +171,13 @@ public class ChunkMessageChannelItemWriter } } + @Override public void update(ExecutionContext executionContext) throws ItemStreamException { executionContext.putInt(EXPECTED, localState.expected.intValue()); executionContext.putInt(ACTUAL, localState.actual.intValue()); } + @Override public Collection getStepContributions() { List contributions = new ArrayList<>(); for (ChunkResponse response : localState.pollChunkResponses()) { diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkProcessorChunkHandler.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkProcessorChunkHandler.java index be7bcc09f..73d45fcb4 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkProcessorChunkHandler.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/ChunkProcessorChunkHandler.java @@ -50,11 +50,7 @@ public class ChunkProcessorChunkHandler implements ChunkHandler, Initializ private ChunkProcessor chunkProcessor; - /* - * (non-Javadoc) - * - * @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet() - */ + @Override public void afterPropertiesSet() throws Exception { Assert.state(chunkProcessor != null, "A ChunkProcessor must be provided"); } @@ -71,6 +67,7 @@ public class ChunkProcessorChunkHandler implements ChunkHandler, Initializ * * @see ChunkHandler#handleChunk(ChunkRequest) */ + @Override @ServiceActivator public ChunkResponse handleChunk(ChunkRequest chunkRequest) throws Exception { diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/MessageSourcePollerInterceptor.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/MessageSourcePollerInterceptor.java index e5633fe29..cc9c93d84 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/MessageSourcePollerInterceptor.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/MessageSourcePollerInterceptor.java @@ -1,3 +1,18 @@ +/* + * Copyright 2010-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.springframework.batch.integration.chunk; import org.apache.commons.logging.Log; @@ -54,6 +69,7 @@ public class MessageSourcePollerInterceptor implements ChannelInterceptor, Initi * Asserts that mandatory properties are set. * @see InitializingBean#afterPropertiesSet() */ + @Override public void afterPropertiesSet() throws Exception { Assert.state(source != null, "A MessageSource must be provided"); } diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/RemoteChunkHandlerFactoryBean.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/RemoteChunkHandlerFactoryBean.java index ea73395f2..9def1ae7c 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/RemoteChunkHandlerFactoryBean.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/RemoteChunkHandlerFactoryBean.java @@ -91,6 +91,7 @@ public class RemoteChunkHandlerFactoryBean implements FactoryBean getObjectType() { return ChunkHandler.class; } @@ -100,6 +101,7 @@ public class RemoteChunkHandlerFactoryBean implements FactoryBean implements FactoryBean getObject() throws Exception { if (stepContributionSource == null) { diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/RemoteChunkingManagerStepBuilder.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/RemoteChunkingManagerStepBuilder.java index 9629eb237..4d033b61c 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/RemoteChunkingManagerStepBuilder.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/chunk/RemoteChunkingManagerStepBuilder.java @@ -190,6 +190,7 @@ public class RemoteChunkingManagerStepBuilder extends FaultTolerantStepBui * @return the configured manager step * @see RemoteChunkHandlerFactoryBean */ + @Override public TaskletStep build() { Assert.notNull(this.inputChannel, "An InputChannel must be provided"); Assert.state(this.outputChannel == null || this.messagingTemplate == null, diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/config/xml/BatchIntegrationNamespaceHandler.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/config/xml/BatchIntegrationNamespaceHandler.java index d6028037f..5b30a4852 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/config/xml/BatchIntegrationNamespaceHandler.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/config/xml/BatchIntegrationNamespaceHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,11 +27,7 @@ import org.springframework.integration.config.xml.AbstractIntegrationNamespaceHa */ public class BatchIntegrationNamespaceHandler extends AbstractIntegrationNamespaceHandler { - /* - * (non-Javadoc) - * - * @see org.springframework.beans.factory.xml.NamespaceHandler#init() - */ + @Override public void init() { this.registerBeanDefinitionParser("job-launching-gateway", new JobLaunchingGatewayParser()); RemoteChunkingManagerParser remoteChunkingManagerParser = new RemoteChunkingManagerParser(); diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/JobLaunchingMessageHandler.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/JobLaunchingMessageHandler.java index 3058af63a..a0bba1117 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/JobLaunchingMessageHandler.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/JobLaunchingMessageHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,6 +45,7 @@ public class JobLaunchingMessageHandler implements JobLaunchRequestHandler { this.jobLauncher = jobLauncher; } + @Override @ServiceActivator public JobExecution launch(JobLaunchRequest request) throws JobExecutionException { Job job = request.getJob(); diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/BeanFactoryStepLocator.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/BeanFactoryStepLocator.java index e066ca48c..4e0aee6ea 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/BeanFactoryStepLocator.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/BeanFactoryStepLocator.java @@ -1,3 +1,18 @@ +/* + * Copyright 2009-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.springframework.batch.integration.partition; import java.util.Arrays; @@ -23,6 +38,7 @@ public class BeanFactoryStepLocator implements StepLocator, BeanFactoryAware { private BeanFactory beanFactory; + @Override public void setBeanFactory(BeanFactory beanFactory) throws BeansException { this.beanFactory = beanFactory; } @@ -31,6 +47,7 @@ public class BeanFactoryStepLocator implements StepLocator, BeanFactoryAware { * Look up a bean with the provided name of type {@link Step}. * @see StepLocator#getStep(String) */ + @Override public Step getStep(String stepName) { return beanFactory.getBean(stepName, Step.class); } @@ -40,6 +57,7 @@ public class BeanFactoryStepLocator implements StepLocator, BeanFactoryAware { * @throws IllegalStateException if the {@link BeanFactory} is not listable * @see StepLocator#getStepNames() */ + @Override public Collection getStepNames() { Assert.state(beanFactory instanceof ListableBeanFactory, "BeanFactory is not listable."); return Arrays.asList(((ListableBeanFactory) beanFactory).getBeanNamesForType(Step.class)); diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/RemotePartitioningManagerStepBuilder.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/RemotePartitioningManagerStepBuilder.java index 9f1e95187..9759b4bc1 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/RemotePartitioningManagerStepBuilder.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/partition/RemotePartitioningManagerStepBuilder.java @@ -192,6 +192,7 @@ public class RemotePartitioningManagerStepBuilder extends PartitionStepBuilder { return this; } + @Override public Step build() { Assert.state(this.outputChannel == null || this.messagingTemplate == null, "You must specify either an outputChannel or a messagingTemplate but not both."); diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/JobRepositorySupport.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/JobRepositorySupport.java index 5b84e85ee..10c068829 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/JobRepositorySupport.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/JobRepositorySupport.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2022 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,104 +34,60 @@ import org.springframework.lang.Nullable; */ public class JobRepositorySupport implements JobRepository { - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.repository.JobRepository#createJobExecution(org. - * springframework.batch.core.Job, org.springframework.batch.core.JobParameters) - */ + @Override public JobExecution createJobExecution(String jobName, JobParameters jobParameters) throws JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException { return new JobExecution(new JobInstance(0L, jobName), jobParameters); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.repository.JobRepository#getJobInstance(java.lang. - * String, org.springframework.batch.core.JobParameters) - */ + @Override public JobInstance getJobInstance(String jobName, JobParameters jobParameters) { return null; } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.repository.JobRepository#getLastStepExecution(org. - * springframework.batch.core.JobInstance, org.springframework.batch.core.Step) - */ + @Override @Nullable public StepExecution getLastStepExecution(JobInstance jobInstance, String stepName) { return null; } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.repository.JobRepository#getStepExecutionCount(org. - * springframework.batch.core.JobInstance, org.springframework.batch.core.Step) - */ + @Override public long getStepExecutionCount(JobInstance jobInstance, String stepName) { return 0; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.repository.JobRepository#saveOrUpdate(org. - * springframework.batch.core.JobExecution) - */ + @Override public void update(JobExecution jobExecution) { } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.repository.JobRepository#saveOrUpdate(org. - * springframework.batch.core.StepExecution) - */ - public void saveOrUpdate(StepExecution stepExecution) { - } - - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.repository.JobRepository# - * saveOrUpdateExecutionContext(org.springframework.batch.core.StepExecution) - */ + @Override public void updateExecutionContext(StepExecution stepExecution) { } + @Override public void updateExecutionContext(JobExecution jobExecution) { } + @Override public void add(StepExecution stepExecution) { } + @Override public void update(StepExecution stepExecution) { } + @Override public boolean isJobInstanceExists(String jobName, JobParameters jobParameters) { return false; } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.core.repository.JobRepository#getLastJobExecution(java. - * lang.String, org.springframework.batch.core.JobParameters) - */ + @Override @Nullable public JobExecution getLastJobExecution(String jobName, JobParameters jobParameters) { return null; } + @Override public void addAll(Collection stepExecutions) { if (stepExecutions != null) { for (StepExecution stepExecution : stepExecutions) { @@ -140,6 +96,7 @@ public class JobRepositorySupport implements JobRepository { } } + @Override public JobInstance createJobInstance(String jobName, JobParameters jobParameters) { return null; } diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/JobSupport.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/JobSupport.java index 7f629c47a..3deacda46 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/JobSupport.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/JobSupport.java @@ -1,11 +1,22 @@ +/* + * Copyright 2008-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.springframework.batch.integration; import org.springframework.batch.core.Job; import org.springframework.batch.core.JobExecution; -import org.springframework.batch.core.JobParametersIncrementer; -import org.springframework.batch.core.JobParametersValidator; -import org.springframework.batch.core.job.DefaultJobParametersValidator; -import org.springframework.lang.Nullable; public class JobSupport implements Job { @@ -15,24 +26,18 @@ public class JobSupport implements Job { this.name = name; } + @Override public void execute(JobExecution execution) { } + @Override public String getName() { return name; } + @Override public boolean isRestartable() { return false; } - @Nullable - public JobParametersIncrementer getJobParametersIncrementer() { - return null; - } - - public JobParametersValidator getJobParametersValidator() { - return new DefaultJobParametersValidator(); - } - } diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/StepSupport.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/StepSupport.java index 0a5479d61..b196cde9e 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/StepSupport.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/StepSupport.java @@ -38,42 +38,20 @@ public class StepSupport implements Step { this.name = name; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.Step#execute(org.springframework.batch.core. - * StepExecution) - */ + @Override public void execute(StepExecution stepExecution) throws JobInterruptedException { } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.Step#getName() - */ + @Override public String getName() { return name; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.Step#getStartLimit() - */ + @Override public int getStartLimit() { return startLimit; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.Step#isAllowStartIfComplete() - */ - public boolean isAllowStartIfComplete() { - return false; - } - /** * Public setter for the startLimit. * @param startLimit the startLimit to set diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/AsyncItemProcessorTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/AsyncItemProcessorTests.java index 401c607ae..49e3a3df9 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/AsyncItemProcessorTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/AsyncItemProcessorTests.java @@ -30,18 +30,12 @@ import org.springframework.batch.item.ItemProcessor; import org.springframework.batch.test.MetaDataInstanceFactory; import org.springframework.batch.test.StepScopeTestUtils; import org.springframework.core.task.SimpleAsyncTaskExecutor; -import org.springframework.lang.Nullable; class AsyncItemProcessorTests { private final AsyncItemProcessor processor = new AsyncItemProcessor<>(); - private ItemProcessor delegate = new ItemProcessor<>() { - @Nullable - public String process(String item) throws Exception { - return item + item; - } - }; + private ItemProcessor delegate = item -> item + item; @Test void testNoDelegate() { @@ -57,13 +51,10 @@ class AsyncItemProcessorTests { @Test void testExecutionInStepScope() throws Exception { - delegate = new ItemProcessor<>() { - @Nullable - public String process(String item) throws Exception { - StepContext context = StepSynchronizationManager.getContext(); - assertTrue(context != null && context.getStepExecution() != null); - return item + item; - } + delegate = item -> { + StepContext context = StepSynchronizationManager.getContext(); + assertTrue(context != null && context.getStepExecution() != null); + return item + item; }; processor.setDelegate(delegate); Future result = StepScopeTestUtils.doInStepScope(MetaDataInstanceFactory.createStepExecution(), diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/MessageSourcePollerInterceptorTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/MessageSourcePollerInterceptorTests.java index 9f1767219..11da50cb6 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/MessageSourcePollerInterceptorTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/MessageSourcePollerInterceptorTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2022 the original author or authors. + * Copyright 2010-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -63,6 +63,7 @@ class MessageSourcePollerInterceptorTests { this.payload = payload; } + @Override public Message receive() { return new GenericMessage<>(payload); } diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/TestItemReader.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/TestItemReader.java index 878a64e4f..2f9555aa5 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/TestItemReader.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/TestItemReader.java @@ -1,3 +1,18 @@ +/* + * Copyright 2009-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.springframework.batch.integration.chunk; import java.util.ArrayList; @@ -40,6 +55,7 @@ public class TestItemReader implements ItemReader { this.items = items; } + @Override @Nullable public T read() throws Exception, UnexpectedInputException, ParseException { diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/TestItemWriter.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/TestItemWriter.java index ac84617c1..a3c54205a 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/TestItemWriter.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/chunk/TestItemWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2022 the original author or authors. + * Copyright 2022-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -52,6 +52,7 @@ public class TestItemWriter implements ItemWriter { */ public static final String WAIT_ON = "wait"; + @Override public void write(Chunk items) throws Exception { for (T item : items) { diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/launch/JobLaunchingMessageHandlerTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/launch/JobLaunchingMessageHandlerTests.java index 96164ef44..06ec4b5bd 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/launch/JobLaunchingMessageHandlerTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/launch/JobLaunchingMessageHandlerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2022 the original author or authors. + * Copyright 2008-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,6 +61,7 @@ class JobLaunchingMessageHandlerTests { AtomicLong jobId = new AtomicLong(); + @Override public JobExecution run(Job job, JobParameters jobParameters) { jobs.add(job); parameters.add(jobParameters); diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/partition/BeanFactoryStepLocatorTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/partition/BeanFactoryStepLocatorTests.java index e51bfd06c..2ca579be4 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/partition/BeanFactoryStepLocatorTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/partition/BeanFactoryStepLocatorTests.java @@ -53,21 +53,20 @@ class BeanFactoryStepLocatorTests { this.name = name; } + @Override public void execute(StepExecution stepExecution) throws JobInterruptedException { } + @Override public String getName() { return name; } + @Override public int getStartLimit() { return 0; } - public boolean isAllowStartIfComplete() { - return false; - } - } } diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/partition/ExampleItemReader.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/partition/ExampleItemReader.java index cc9965e7c..855c60484 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/partition/ExampleItemReader.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/partition/ExampleItemReader.java @@ -1,3 +1,18 @@ +/* + * Copyright 2009-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.springframework.batch.integration.partition; import org.apache.commons.logging.Log; @@ -24,6 +39,7 @@ public class ExampleItemReader implements ItemReader, ItemStream { /** * Reads next record from input */ + @Override @Nullable public String read() throws Exception { if (index >= input.length) { @@ -45,13 +61,12 @@ public class ExampleItemReader implements ItemReader, ItemStream { return input[index++]; } - public void close() throws ItemStreamException { - } - + @Override public void open(ExecutionContext executionContext) throws ItemStreamException { index = (int) executionContext.getLong("POSITION", 0); } + @Override public void update(ExecutionContext executionContext) throws ItemStreamException { executionContext.putLong("POSITION", index); } diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/partition/ExampleItemWriter.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/partition/ExampleItemWriter.java index f2053293f..3f928f8c4 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/partition/ExampleItemWriter.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/partition/ExampleItemWriter.java @@ -31,6 +31,7 @@ public class ExampleItemWriter implements ItemWriter { /** * @see ItemWriter#write(Chunk) */ + @Override public void write(Chunk data) throws Exception { log.info(data); } diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/RepeatTransactionalPollingIntegrationTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/RepeatTransactionalPollingIntegrationTests.java index 31a2d803e..3ac04bda2 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/RepeatTransactionalPollingIntegrationTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/RepeatTransactionalPollingIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2008-2022 the original author or authors. + * Copyright 2008-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -53,6 +53,7 @@ class RepeatTransactionalPollingIntegrationTests implements ApplicationContextAw private volatile static int count = 0; + @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { bus = (Lifecycle) applicationContext; } diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/RetryRepeatTransactionalPollingIntegrationTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/RetryRepeatTransactionalPollingIntegrationTests.java index 737e83972..15db6d263 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/RetryRepeatTransactionalPollingIntegrationTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/RetryRepeatTransactionalPollingIntegrationTests.java @@ -52,6 +52,7 @@ class RetryRepeatTransactionalPollingIntegrationTests implements ApplicationCont private Lifecycle lifecycle; + @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { lifecycle = (Lifecycle) applicationContext; } diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/RetryTransactionalPollingIntegrationTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/RetryTransactionalPollingIntegrationTests.java index 82be45cf1..0f308727c 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/RetryTransactionalPollingIntegrationTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/RetryTransactionalPollingIntegrationTests.java @@ -51,6 +51,7 @@ public class RetryTransactionalPollingIntegrationTests implements ApplicationCon private Lifecycle bus; + @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { bus = (Lifecycle) applicationContext; } diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/SimpleRecoverer.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/SimpleRecoverer.java index 8a1c7345d..bc11d7399 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/SimpleRecoverer.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/SimpleRecoverer.java @@ -1,3 +1,18 @@ +/* + * Copyright 2008-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.springframework.batch.integration.retry; import java.util.ArrayList; @@ -26,6 +41,7 @@ public final class SimpleRecoverer implements MethodInvocationRecoverer return recovered; } + @Override public String recover(Object[] data, Throwable cause) { if (data == null) { return null; diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/SimpleService.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/SimpleService.java index 8afe70be0..2257ce8fa 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/SimpleService.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/SimpleService.java @@ -1,3 +1,18 @@ +/* + * Copyright 2008-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package org.springframework.batch.integration.retry; import java.util.ArrayList; @@ -33,6 +48,7 @@ public class SimpleService implements Service { return processed; } + @Override @ServiceActivator(inputChannel = "requests", outputChannel = "replies") public String process(String message) { String result = message + ": " + count.incrementAndGet(); diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/TransactionalPollingIntegrationTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/TransactionalPollingIntegrationTests.java index f96db3f30..5fe57bb65 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/TransactionalPollingIntegrationTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/retry/TransactionalPollingIntegrationTests.java @@ -52,6 +52,7 @@ class TransactionalPollingIntegrationTests implements ApplicationContextAware { private Lifecycle bus; + @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { bus = (Lifecycle) applicationContext; } diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/step/TestTasklet.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/step/TestTasklet.java index 8307332cf..59c42baa7 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/step/TestTasklet.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/step/TestTasklet.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2019 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,6 +33,7 @@ public class TestTasklet implements Tasklet { this.fail = fail; } + @Override @Nullable public RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext) throws Exception { if (fail) { diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/samples/common/StagingItemWriter.java b/spring-batch-samples/src/main/java/org/springframework/batch/samples/common/StagingItemWriter.java index bd372246a..b56454502 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/samples/common/StagingItemWriter.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/samples/common/StagingItemWriter.java @@ -95,23 +95,12 @@ public class StagingItemWriter extends JdbcDaoSupport implements StepExecutio }); } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.domain.StepListener#afterStep(StepExecution ) - */ @Nullable @Override public ExitStatus afterStep(StepExecution stepExecution) { return null; } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.core.domain.StepListener#beforeStep(org. - * springframework.batch.core.domain.StepExecution) - */ @Override public void beforeStep(StepExecution stepExecution) { this.stepExecution = stepExecution; diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/CompositeCustomerUpdateLineTokenizer.java b/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/CompositeCustomerUpdateLineTokenizer.java index 6b1928568..1c081de5f 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/CompositeCustomerUpdateLineTokenizer.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/CompositeCustomerUpdateLineTokenizer.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -40,13 +40,6 @@ public class CompositeCustomerUpdateLineTokenizer implements StepExecutionListen private StepExecution stepExecution; - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.item.file.transform.LineTokenizer#tokenize(java.lang. - * String) - */ @Override public FieldSet tokenize(@Nullable String line) { diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/internal/CommonsLoggingInvalidCustomerLogger.java b/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/internal/CommonsLoggingInvalidCustomerLogger.java index b05a52d8a..fc4d0272f 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/internal/CommonsLoggingInvalidCustomerLogger.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/internal/CommonsLoggingInvalidCustomerLogger.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2014 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,12 +30,6 @@ public class CommonsLoggingInvalidCustomerLogger implements InvalidCustomerLogge protected static final Log LOG = LogFactory.getLog(CommandLineJobRunner.class); - /* - * (non-Javadoc) - * - * @see org.springframework.batch.samples.domain.trade.InvalidCustomerLogger#log(org. - * springframework.batch.sample.domain.trade.CustomerUpdate) - */ @Override public void log(CustomerUpdate customerUpdate) { LOG.error("invalid customer encountered: [ " + customerUpdate + "]"); diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/internal/CustomerCreditUpdatePreparedStatementSetter.java b/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/internal/CustomerCreditUpdatePreparedStatementSetter.java index d2e8f865d..cad2e9f86 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/internal/CustomerCreditUpdatePreparedStatementSetter.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/internal/CustomerCreditUpdatePreparedStatementSetter.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,13 +31,6 @@ public class CustomerCreditUpdatePreparedStatementSetter implements ItemPrepared public static final BigDecimal FIXED_AMOUNT = new BigDecimal(1000); - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.io.support.ItemPreparedStatementSetter#setValues(java. - * lang.Object, java.sql.PreparedStatement) - */ @Override public void setValues(CustomerCredit customerCredit, PreparedStatement ps) throws SQLException { ps.setBigDecimal(1, customerCredit.getCredit().add(FIXED_AMOUNT)); diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/internal/FlatFileCustomerCreditDao.java b/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/internal/FlatFileCustomerCreditDao.java index 06f11a50b..156e933e3 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/internal/FlatFileCustomerCreditDao.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/internal/FlatFileCustomerCreditDao.java @@ -72,11 +72,6 @@ public class FlatFileCustomerCreditDao implements CustomerCreditDao, DisposableB } } - /* - * (non-Javadoc) - * - * @see org.springframework.beans.factory.DisposableBean#destroy() - */ @Override public void destroy() throws Exception { close(); diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/internal/HibernateCreditDao.java b/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/internal/HibernateCreditDao.java index 34e11f99e..b0f3284fd 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/internal/HibernateCreditDao.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/samples/domain/trade/internal/HibernateCreditDao.java @@ -51,13 +51,6 @@ public class HibernateCreditDao implements CustomerCreditDao, RepeatListener { return errors; } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.samples.domain.trade.internal.CustomerCreditWriter#write( - * org.springframework.batch.samples.domain.CustomerCredit) - */ @Override public void writeCredit(CustomerCredit customerCredit) { if (customerCredit.getId() == failOnFlush) { @@ -73,11 +66,6 @@ public class HibernateCreditDao implements CustomerCreditDao, RepeatListener { } } - /* - * (non-Javadoc) - * - * @see org.springframework.batch.io.OutputSource#write(java.lang.Object) - */ public void write(Object output) { writeCredit((CustomerCredit) output); } @@ -95,46 +83,18 @@ public class HibernateCreditDao implements CustomerCreditDao, RepeatListener { errors.add(e); } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.repeat.RepeatInterceptor#after(org.springframework.batch. - * repeat.RepeatContext, org.springframework.batch.repeat.ExitStatus) - */ @Override public void after(RepeatContext context, RepeatStatus result) { } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.repeat.RepeatInterceptor#before(org.springframework.batch - * .repeat.RepeatContext) - */ @Override public void before(RepeatContext context) { } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.repeat.RepeatInterceptor#close(org.springframework.batch. - * repeat.RepeatContext) - */ @Override public void close(RepeatContext context) { } - /* - * (non-Javadoc) - * - * @see - * org.springframework.batch.repeat.RepeatInterceptor#open(org.springframework.batch. - * repeat.RepeatContext) - */ @Override public void open(RepeatContext context) { } diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/samples/football/internal/PlayerSummaryMapper.java b/spring-batch-samples/src/main/java/org/springframework/batch/samples/football/internal/PlayerSummaryMapper.java index 5570ded7e..1c609559d 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/samples/football/internal/PlayerSummaryMapper.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/samples/football/internal/PlayerSummaryMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2019 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,11 +30,6 @@ import org.springframework.jdbc.core.RowMapper; */ public class PlayerSummaryMapper implements RowMapper { - /* - * (non-Javadoc) - * - * @see org.springframework.jdbc.core.RowMapper#mapRow(java.sql.ResultSet, int) - */ @Override public PlayerSummary mapRow(ResultSet rs, int rowNum) throws SQLException { diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/samples/football/internal/PlayerSummaryRowMapper.java b/spring-batch-samples/src/main/java/org/springframework/batch/samples/football/internal/PlayerSummaryRowMapper.java index 042c961a3..c9b0b6f11 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/samples/football/internal/PlayerSummaryRowMapper.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/samples/football/internal/PlayerSummaryRowMapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2019 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,11 +30,6 @@ import org.springframework.jdbc.core.RowMapper; */ public class PlayerSummaryRowMapper implements RowMapper { - /* - * (non-Javadoc) - * - * @see org.springframework.jdbc.core.RowMapper#mapRow(java.sql.ResultSet, int) - */ @Override public PlayerSummary mapRow(ResultSet rs, int rowNum) throws SQLException { diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/samples/misc/jmx/SimpleMessageApplicationEvent.java b/spring-batch-samples/src/main/java/org/springframework/batch/samples/misc/jmx/SimpleMessageApplicationEvent.java index 72d12cbf5..5d27c1484 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/samples/misc/jmx/SimpleMessageApplicationEvent.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/samples/misc/jmx/SimpleMessageApplicationEvent.java @@ -33,11 +33,6 @@ public class SimpleMessageApplicationEvent extends ApplicationEvent { this.message = message; } - /* - * (non-Javadoc) - * - * @see java.util.EventObject#toString() - */ @Override public String toString() { return "message=[" + message + "], " + super.toString(); diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/samples/filter/CustomerFilterJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/samples/filter/CustomerFilterJobFunctionalTests.java index bd97db549..26aa4c3ac 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/samples/filter/CustomerFilterJobFunctionalTests.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/samples/filter/CustomerFilterJobFunctionalTests.java @@ -131,11 +131,6 @@ class CustomerFilterJobFunctionalTests { return name; } - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ @Override public int hashCode() { final int PRIME = 31; @@ -147,11 +142,6 @@ class CustomerFilterJobFunctionalTests { return result; } - /* - * (non-Javadoc) - * - * @see java.lang.Object#equals(java.lang.Object) - */ @Override public boolean equals(Object obj) { if (this == obj) diff --git a/spring-batch-test/src/test/java/org/springframework/batch/test/jmx/SimpleMessageApplicationEvent.java b/spring-batch-test/src/test/java/org/springframework/batch/test/jmx/SimpleMessageApplicationEvent.java index abce51907..fd92280d7 100755 --- a/spring-batch-test/src/test/java/org/springframework/batch/test/jmx/SimpleMessageApplicationEvent.java +++ b/spring-batch-test/src/test/java/org/springframework/batch/test/jmx/SimpleMessageApplicationEvent.java @@ -32,11 +32,6 @@ public class SimpleMessageApplicationEvent extends ApplicationEvent { this.message = message; } - /* - * (non-Javadoc) - * - * @see java.util.EventObject#toString() - */ @Override public String toString() { return "message=[" + message + "], " + super.toString(); diff --git a/spring-batch-test/src/test/java/org/springframework/batch/test/jmx/StepExecutionApplicationEventAdvice.java b/spring-batch-test/src/test/java/org/springframework/batch/test/jmx/StepExecutionApplicationEventAdvice.java index 2a9c5d00f..3e7186813 100755 --- a/spring-batch-test/src/test/java/org/springframework/batch/test/jmx/StepExecutionApplicationEventAdvice.java +++ b/spring-batch-test/src/test/java/org/springframework/batch/test/jmx/StepExecutionApplicationEventAdvice.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,12 +32,6 @@ public class StepExecutionApplicationEventAdvice implements ApplicationEventPubl private ApplicationEventPublisher applicationEventPublisher; - /* - * (non-Javadoc) - * - * @see org.springframework.context.ApplicationEventPublisherAware# - * setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher) - */ @Override public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) { this.applicationEventPublisher = applicationEventPublisher;