From 340406a61ff8ac88ac94e2ba467305db7c1c4bba Mon Sep 17 00:00:00 2001 From: Michael Minella Date: Thu, 14 Sep 2017 14:29:26 -0500 Subject: [PATCH] Polish --- .../batch/core/JobExecution.java | 9 ++-- .../batch/core/StepContribution.java | 9 ++-- .../batch/core/StepExecution.java | 2 +- .../configuration/DuplicateJobException.java | 4 +- .../xml/StepParserStepFactoryBean.java | 48 +++++++++---------- .../batch/core/job/flow/FlowExecution.java | 2 +- .../core/job/flow/FlowExecutionException.java | 4 +- .../core/job/flow/FlowExecutionStatus.java | 2 +- .../batch/core/job/flow/FlowExecutor.java | 2 +- .../batch/core/job/flow/JobFlowExecutor.java | 2 +- .../job/flow/support/state/AbstractState.java | 2 +- .../job/flow/support/state/DecisionState.java | 2 +- .../job/flow/support/state/FlowState.java | 4 +- .../job/flow/support/state/SplitState.java | 2 +- .../batch/core/jsr/launch/JsrJobOperator.java | 4 +- .../JobExecutionNotFailedException.java | 4 +- .../JobInstanceAlreadyExistsException.java | 4 +- .../batch/core/launch/JobLauncher.java | 2 +- .../batch/core/launch/JobOperator.java | 15 +++--- .../JobParametersNotFoundException.java | 4 +- .../batch/core/launch/NoSuchJobException.java | 4 +- .../launch/NoSuchJobExecutionException.java | 4 +- .../launch/NoSuchJobInstanceException.java | 4 +- .../CompositeItemProcessListener.java | 2 +- .../listener/CompositeItemReadListener.java | 2 +- .../listener/CompositeItemWriteListener.java | 3 +- .../CompositeJobExecutionListener.java | 2 +- .../core/listener/CompositeSkipListener.java | 2 +- .../CompositeStepExecutionListener.java | 2 +- .../ExecutionContextPromotionListener.java | 2 +- .../core/listener/StepListenerMetaData.java | 4 +- .../DefaultExecutionContextSerializer.java | 2 +- .../dao/JdbcExecutionContextDao.java | 2 +- .../core/repository/dao/JobExecutionDao.java | 2 +- .../batch/core/step/AbstractStep.java | 2 +- .../builder/FaultTolerantStepBuilder.java | 2 +- .../factory/FaultTolerantStepFactoryBean.java | 2 +- .../core/step/item/SimpleChunkProcessor.java | 6 +-- .../batch/core/step/item/SkipWrapper.java | 4 +- .../step/tasklet/SystemCommandTasklet.java | 2 +- 40 files changed, 92 insertions(+), 90 deletions(-) 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 3803c249a..62f39c809 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 @@ -16,8 +16,6 @@ package org.springframework.batch.core; -import org.springframework.batch.item.ExecutionContext; - import java.io.IOException; import java.io.ObjectInputStream; import java.util.ArrayList; @@ -30,6 +28,8 @@ import java.util.Set; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CopyOnWriteArraySet; +import org.springframework.batch.item.ExecutionContext; + /** * Batch domain object representing the execution of a job. * @@ -89,7 +89,7 @@ public class JobExecution extends Entity { * @param id {@link Long} that represents the id for the JobExecution. * @param jobParameters {@link JobParameters} instance for this JobExecution. * @param jobConfigurationName {@link String} instance that represents the - * job configuration name. + * job configuration name (used with JSR-352). */ public JobExecution(JobInstance job, Long id, JobParameters jobParameters, String jobConfigurationName) { super(id); @@ -218,7 +218,8 @@ public class JobExecution extends Entity { /** * Register a step execution with the current job execution. * @param stepName the name of the step the new execution is associated with - * @return {@link StepExecution} instance created by this method. + * @return {@link StepExecution} an empty {@code StepExecution} associated with this + * {@code JobExecution}. */ public StepExecution createStepExecution(String stepName) { StepExecution stepExecution = new StepExecution(stepName, this); 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 cabe3da2e..cb7ccfb16 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 @@ -44,7 +44,8 @@ public class StepContribution implements Serializable { private ExitStatus exitStatus = ExitStatus.EXECUTING; /** - * @param execution {@link StepExecution} instance to be used by the step contribution. + * @param execution {@link StepExecution} the stepExecution used to initialize + * {@code skipCount}. */ public StepContribution(StepExecution execution) { this.parentSkipCount = execution.getSkipCount(); @@ -71,7 +72,7 @@ public class StepContribution implements Serializable { /** * Increment the counter for the number of items processed. * - * @param count int used to set the increment filter count. + * @param count int amount to increment by. */ public void incrementFilterCount(int count) { filterCount += count; @@ -87,7 +88,7 @@ public class StepContribution implements Serializable { /** * Increment the counter for the number of items written. * - * @param count int used to increment the write count. + * @param count int amount to increment by. */ public void incrementWriteCount(int count) { writeCount += count; @@ -147,7 +148,7 @@ public class StepContribution implements Serializable { /** * Increment the read skip count for this contribution * - * @param count int used to increment the read skip count. + * @param count int amount to increment by. */ public void incrementReadSkipCount(int count) { readSkipCount += count; 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 e7bf1ecd6..8b327ac1a 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 @@ -236,7 +236,7 @@ public class StepExecution extends Entity { /** * Setter for number of rollbacks for this execution - * @param rollbackCount int used to set the rollbackCount. + * @param rollbackCount int the number of rollbacks. */ public void setRollbackCount(int rollbackCount) { this.rollbackCount = rollbackCount; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/DuplicateJobException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/DuplicateJobException.java index c2242d50f..6e8b845a2 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/DuplicateJobException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/DuplicateJobException.java @@ -31,14 +31,14 @@ public class DuplicateJobException extends JobExecutionException { /** * Create an exception with the given message. * - * @param msg The message to send to caller. + * @param msg error message. */ public DuplicateJobException(String msg) { super(msg); } /** - * @param msg The message to send to caller. + * @param msg error message. * @param e instance of {@link Throwable} that is the cause of the exception. */ public DuplicateJobException(String msg, Throwable e) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java index 58a9cc9b0..28ec16326 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java @@ -16,6 +16,23 @@ package org.springframework.batch.core.configuration.xml; +import java.io.Serializable; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.Map; +import java.util.Queue; +import java.util.Set; +import java.util.concurrent.locks.ReentrantLock; +import javax.batch.api.chunk.listener.RetryProcessListener; +import javax.batch.api.chunk.listener.RetryReadListener; +import javax.batch.api.chunk.listener.RetryWriteListener; +import javax.batch.api.chunk.listener.SkipProcessListener; +import javax.batch.api.chunk.listener.SkipReadListener; +import javax.batch.api.chunk.listener.SkipWriteListener; +import javax.batch.api.partition.PartitionCollector; + import org.springframework.batch.core.ChunkListener; import org.springframework.batch.core.ItemProcessListener; import org.springframework.batch.core.ItemReadListener; @@ -79,23 +96,6 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.interceptor.DefaultTransactionAttribute; import org.springframework.util.Assert; -import javax.batch.api.chunk.listener.RetryProcessListener; -import javax.batch.api.chunk.listener.RetryReadListener; -import javax.batch.api.chunk.listener.RetryWriteListener; -import javax.batch.api.chunk.listener.SkipProcessListener; -import javax.batch.api.chunk.listener.SkipReadListener; -import javax.batch.api.chunk.listener.SkipWriteListener; -import javax.batch.api.partition.PartitionCollector; -import java.io.Serializable; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.LinkedHashSet; -import java.util.Map; -import java.util.Queue; -import java.util.Set; -import java.util.concurrent.locks.ReentrantLock; - /** * This {@link FactoryBean} is used by the batch namespace parser to create {@link Step} objects. Stores all of the * properties that are configurable on the <step/> (and its inner <tasklet/>). Based on which properties are @@ -757,7 +757,7 @@ public class StepParserStepFactoryBean implements FactoryBean, BeanN /** * Public setter for {@link JobRepository}. * - * @param jobRepository {@link JobRepository} instance to be used by the factory bean. + * @param jobRepository {@link JobRepository} instance to be used by the step. */ public void setJobRepository(JobRepository jobRepository) { this.jobRepository = jobRepository; @@ -775,7 +775,7 @@ public class StepParserStepFactoryBean implements FactoryBean, BeanN /** * A preconfigured {@link Tasklet} to use. * - * @param tasklet {@link Tasklet} instance to be used by the factory bean. + * @param tasklet {@link Tasklet} instance to be used by step. */ public void setTasklet(Tasklet tasklet) { this.tasklet = tasklet; @@ -787,7 +787,7 @@ public class StepParserStepFactoryBean implements FactoryBean, BeanN /** * @return transactionManager instance of {@link PlatformTransactionManager} - * used by the factory bean. + * used by the step. */ public PlatformTransactionManager getTransactionManager() { return transactionManager; @@ -1137,28 +1137,28 @@ public class StepParserStepFactoryBean implements FactoryBean, BeanN // ========================================================= /** - * @param hasChunkElement true if step has <chunk> element. + * @param hasChunkElement true if step has <chunk/> element. */ public void setHasChunkElement(boolean hasChunkElement) { this.hasChunkElement = hasChunkElement; } /** - * @return true if the defined step has a <chunk> element + * @return true if the defined step has a <chunk/> element */ protected boolean hasChunkElement() { return this.hasChunkElement; } /** - * @return true if the defined step has a <tasklet> element + * @return true if the defined step has a <tasklet/> element */ protected boolean hasTasklet() { return this.tasklet != null; } /** - * @return true if the defined step has a <partition> element + * @return true if the defined step has a <partition/> element */ protected boolean hasPartitionElement() { return this.partitionHandler != null; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecution.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecution.java index b48909a01..237e0afc5 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecution.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecution.java @@ -26,7 +26,7 @@ public class FlowExecution implements Comparable { private final FlowExecutionStatus status; /** - * @param name the flow execution name to be associated with the FlowExecution. + * @param name the flow name to be associated with the FlowExecution. * @param status the {@link FlowExecutionStatus} to be associated with the FlowExecution. */ public FlowExecution(String name, FlowExecutionStatus status) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionException.java index 782d67fa9..3a849eb6d 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionException.java @@ -23,14 +23,14 @@ package org.springframework.batch.core.job.flow; public class FlowExecutionException extends Exception { /** - * @param message the message to be associated with this exception. + * @param message the error message. */ public FlowExecutionException(String message) { super(message); } /** - * @param message the message to be associated with this exception. + * @param message the error message. * @param cause instance of {@link Throwable} that caused this exception. */ public FlowExecutionException(String message, Throwable cause) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionStatus.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionStatus.java index 268d0374d..d28eca80a 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionStatus.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutionStatus.java @@ -64,7 +64,7 @@ public class FlowExecutionStatus implements Comparable { } /** - * @param status String containing the status to be associated with this instance. + * @param status String status value. */ public FlowExecutionStatus(String status) { this.name = status; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutor.java index cd4f1868e..a5f227290 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutor.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/FlowExecutor.java @@ -67,7 +67,7 @@ public interface FlowExecutor { * Handle any status changes that might be needed in the * {@link JobExecution}. * - * @param status instance of {@link FlowExecutionStatus} to be associated with FlowExecutor. + * @param status status to update the {@link JobExecution} to. */ void updateJobExecutionStatus(FlowExecutionStatus status); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/JobFlowExecutor.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/JobFlowExecutor.java index bca08800e..45c70b750 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/JobFlowExecutor.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/JobFlowExecutor.java @@ -136,7 +136,7 @@ public class JobFlowExecutor implements FlowExecutor { } /** - * @param status instance of {@link FlowExecutionStatus}. + * @param status {@link FlowExecutionStatus} to convert. * @return A {@link BatchStatus} appropriate for the {@link FlowExecutionStatus} provided */ protected BatchStatus findBatchStatus(FlowExecutionStatus status) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/AbstractState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/AbstractState.java index b7d2dacf1..b996f667b 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/AbstractState.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/AbstractState.java @@ -29,7 +29,7 @@ public abstract class AbstractState implements State { private final String name; /** - * @param name to be used by the state. + * @param name of the state. */ public AbstractState(String name) { this.name = name; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/DecisionState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/DecisionState.java index b0afe80a7..292e4c7d5 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/DecisionState.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/DecisionState.java @@ -32,7 +32,7 @@ public class DecisionState extends AbstractState { /** * @param decider the {@link JobExecutionDecider} instance to make the status decision. - * @param name the name to be associated with the decision state. + * @param name the name of the decision state. */ public DecisionState(JobExecutionDecider decider, String name) { super(name); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/FlowState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/FlowState.java index 13ff22986..3bc358eab 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/FlowState.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/FlowState.java @@ -35,8 +35,8 @@ public class FlowState extends AbstractState implements FlowHolder { private final Flow flow; /** - * @param flow the {@link Flow} instance to be used by the state. - * @param name the name to be associated with the state. + * @param flow the {@link Flow} to delegate to. + * @param name the name of the state. */ public FlowState(Flow flow, String name) { super(name); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/SplitState.java b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/SplitState.java index 85499b1fc..f56111f6a 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/SplitState.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/job/flow/support/state/SplitState.java @@ -50,7 +50,7 @@ public class SplitState extends AbstractState implements FlowHolder { /** * @param flows collection of {@link Flow} instances. - * @param name the name to be associated with the state. + * @param name the name of the state. */ public SplitState(Collection flows, String name) { super(name); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/launch/JsrJobOperator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/launch/JsrJobOperator.java index 4cf937215..e9fb886b3 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/launch/JsrJobOperator.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/launch/JsrJobOperator.java @@ -177,7 +177,7 @@ public class JsrJobOperator implements JobOperator, ApplicationContextAware, Ini * @param jobExplorer an instance of Spring Batch's {@link JobExplorer}. * @param jobRepository an instance of Spring Batch's {@link JobOperator}. * @param jobParametersConverter an instance of Spring Batch's {@link JobParametersConverter}. - * @param transactionManager and instance of Spring Batch's {@link javax.transaction.TransactionManager}. + * @param transactionManager a {@link javax.transaction.TransactionManager}. */ public JsrJobOperator(JobExplorer jobExplorer, JobRepository jobRepository, JobParametersConverter jobParametersConverter, PlatformTransactionManager transactionManager) { Assert.notNull(jobExplorer, "A JobExplorer is required"); @@ -719,7 +719,7 @@ public class JsrJobOperator implements JobOperator, ApplicationContextAware, Ini * * @param executionId the database id for the {@link JobExecution} to be stopped. * @throws NoSuchJobExecutionException thrown if {@link JobExecution} instance does not exist. - * @throws JobExecutionNotRunningException thrownif {@link JobExecution} is not running. + * @throws JobExecutionNotRunningException thrown if {@link JobExecution} is not running. */ @Override public void stop(long executionId) throws NoSuchJobExecutionException, diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobExecutionNotFailedException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobExecutionNotFailedException.java index 87b238d9b..c03eee6ea 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobExecutionNotFailedException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobExecutionNotFailedException.java @@ -30,14 +30,14 @@ public class JobExecutionNotFailedException extends JobExecutionException { /** * Create an exception with the given message. * - * @param msg The message to send to the caller. + * @param msg the error message. */ public JobExecutionNotFailedException(String msg) { super(msg); } /** - * @param msg The message to send to caller + * @param msg the error message * @param e the cause of the exception */ public JobExecutionNotFailedException(String msg, Throwable e) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobInstanceAlreadyExistsException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobInstanceAlreadyExistsException.java index 8618c34f7..8fb27fc2e 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobInstanceAlreadyExistsException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobInstanceAlreadyExistsException.java @@ -32,14 +32,14 @@ public class JobInstanceAlreadyExistsException extends JobExecutionException { /** * Create an exception with the given message. * - * @param msg The message to send to caller. + * @param msg the error message. */ public JobInstanceAlreadyExistsException(String msg) { super(msg); } /** - * @param msg The message to send to caller. + * @param msg the error message. * @param e the cause of the exception. */ public JobInstanceAlreadyExistsException(String msg, Throwable e) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobLauncher.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobLauncher.java index 86e62cc0b..539a232a1 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobLauncher.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobLauncher.java @@ -48,7 +48,7 @@ public interface JobLauncher { * JobExecution will be returned, and the status will need to be inspected. * * @param job the job to be executed. - * @param jobParameters the parameters to be associated with the job. + * @param jobParameters the parameters passed to this execution of the job. * @return the {@link JobExecution} if it returns synchronously. If the * implementation is asynchronous, the status might well be unknown. * diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobOperator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobOperator.java index 59132f1a9..5cdd59dde 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobOperator.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobOperator.java @@ -15,6 +15,10 @@ */ package org.springframework.batch.core.launch; +import java.util.List; +import java.util.Map; +import java.util.Set; + import org.springframework.batch.core.Job; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobInstance; @@ -27,10 +31,6 @@ import org.springframework.batch.core.repository.JobExecutionAlreadyRunningExcep import org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException; import org.springframework.batch.core.repository.JobRestartException; -import java.util.List; -import java.util.Map; -import java.util.Set; - /** * Low level interface for inspecting and controlling jobs with access only to * primitive and collection types. Suitable for a command-line client (e.g. that @@ -50,7 +50,8 @@ public interface JobOperator { * @param instanceId the id of a {@link JobInstance} * @return the id values of all the {@link JobExecution JobExecutions} * associated with this instance - * @throws NoSuchJobInstanceException is thrown if job for instance id does not exist. + * @throws NoSuchJobInstanceException if the {@link JobInstance} associated with the + * {@code instanceId} cannot be found. */ List getExecutions(long instanceId) throws NoSuchJobInstanceException; @@ -62,7 +63,7 @@ public interface JobOperator { * @param start the start index of the instances * @param count the maximum number of values to return * @return the id values of the {@link JobInstance JobInstances} - * @throws NoSuchJobException is thrown if job for the jobName does not exist. + * @throws NoSuchJobException is thrown if no {@link JobInstance}s for the jobName exist. */ List getJobInstances(String jobName, int start, int count) throws NoSuchJobException; @@ -99,7 +100,7 @@ public interface JobOperator { * name * @throws JobInstanceAlreadyExistsException if a job instance with this * name and parameters already exists - * @throws JobParametersInvalidException thrown if some of the job parameters are invalid. + * @throws JobParametersInvalidException thrown if any of the job parameters are invalid. */ Long start(String jobName, String parameters) throws NoSuchJobException, JobInstanceAlreadyExistsException, JobParametersInvalidException; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobParametersNotFoundException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobParametersNotFoundException.java index 2d25d7daf..8c9a0fb4a 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobParametersNotFoundException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/JobParametersNotFoundException.java @@ -32,14 +32,14 @@ public class JobParametersNotFoundException extends JobExecutionException { /** * Create an exception with the given message. * - * @param msg The message to send to caller. + * @param msg the error message. */ public JobParametersNotFoundException(String msg) { super(msg); } /** - * @param msg The message to send to caller. + * @param msg the error message. * @param e the cause of the exception. */ public JobParametersNotFoundException(String msg, Throwable e) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobException.java index e78973c2e..bfce130cc 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobException.java @@ -32,14 +32,14 @@ public class NoSuchJobException extends JobExecutionException { /** * Create an exception with the given message. * - * @param msg The message to send to caller. + * @param msg the error message. */ public NoSuchJobException(String msg) { super(msg); } /** - * @param msg The message to send to caller. + * @param msg the error message. * @param e the cause of the exception. */ public NoSuchJobException(String msg, Throwable e) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobExecutionException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobExecutionException.java index b02fb2049..d50ffa7ef 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobExecutionException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobExecutionException.java @@ -31,14 +31,14 @@ public class NoSuchJobExecutionException extends JobExecutionException { /** * Create an exception with the given message. * - * @param msg The message to send to caller. + * @param msg the error message. */ public NoSuchJobExecutionException(String msg) { super(msg); } /** - * @param msg The message to send to caller. + * @param msg the error message. * @param e the cause of the exception. */ public NoSuchJobExecutionException(String msg, Throwable e) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobInstanceException.java b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobInstanceException.java index e10694a1f..39df14303 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobInstanceException.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/launch/NoSuchJobInstanceException.java @@ -31,14 +31,14 @@ public class NoSuchJobInstanceException extends JobExecutionException { /** * Create an exception with the given message. * - * @param msg The message to send to caller. + * @param msg the error message. */ public NoSuchJobInstanceException(String msg) { super(msg); } /** - * @param msg The message to send to caller. + * @param msg the error message. * @param e the cause of the exception. */ public NoSuchJobInstanceException(String msg, Throwable e) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemProcessListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemProcessListener.java index 02b726199..a6124d68a 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemProcessListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemProcessListener.java @@ -41,7 +41,7 @@ public class CompositeItemProcessListener implements ItemProcessListener itemProcessorListener) { listeners.add(itemProcessorListener); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemReadListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemReadListener.java index f5267e763..b454f9c87 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemReadListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemReadListener.java @@ -42,7 +42,7 @@ public class CompositeItemReadListener implements ItemReadListener { /** * Register additional listener. * - * @param itemReaderListener instance of {@link ItemReadListener} to be called when read events occur. + * @param itemReaderListener instance of {@link ItemReadListener} to be registered. */ public void register(ItemReadListener itemReaderListener) { listeners.add(itemReaderListener); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemWriteListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemWriteListener.java index 5b7f5a4c3..54e17dd99 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemWriteListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeItemWriteListener.java @@ -18,7 +18,6 @@ package org.springframework.batch.core.listener; import java.util.Iterator; import java.util.List; -import org.springframework.batch.core.ItemProcessListener; import org.springframework.batch.core.ItemWriteListener; import org.springframework.core.Ordered; @@ -43,7 +42,7 @@ public class CompositeItemWriteListener implements ItemWriteListener { /** * Register additional listener. * - * @param itemWriteListener list of {@link ItemWriteListener}s to be called when write events occur. + * @param itemWriteListener list of {@link ItemWriteListener}s to be registered. */ public void register(ItemWriteListener itemWriteListener) { listeners.add(itemWriteListener); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeJobExecutionListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeJobExecutionListener.java index 03de6998c..7b68a6226 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeJobExecutionListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeJobExecutionListener.java @@ -42,7 +42,7 @@ public class CompositeJobExecutionListener implements JobExecutionListener { /** * Register additional listener. * - * @param jobExecutionListener instance {@link JobExecutionListener} to be called when job execution events occur. + * @param jobExecutionListener instance {@link JobExecutionListener} to be registered. */ public void register(JobExecutionListener jobExecutionListener) { listeners.add(jobExecutionListener); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeSkipListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeSkipListener.java index a09510c04..de3704489 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeSkipListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeSkipListener.java @@ -41,7 +41,7 @@ public class CompositeSkipListener implements SkipListener { /** * Register additional listener. * - * @param listener instance of {@link SkipListener} to be called when skip events occur. + * @param listener instance of {@link SkipListener} to be registered. */ public void register(SkipListener listener) { listeners.add(listener); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeStepExecutionListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeStepExecutionListener.java index 00cbe26fc..20438ac58 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeStepExecutionListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/CompositeStepExecutionListener.java @@ -44,7 +44,7 @@ public class CompositeStepExecutionListener implements StepExecutionListener { /** * Register additional listener. * - * @param stepExecutionListener instance of {@link StepExecutionListener} to be called when step execution events occur. + * @param stepExecutionListener instance of {@link StepExecutionListener} to be registered. */ public void register(StepExecutionListener stepExecutionListener) { list.add(stepExecutionListener); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ExecutionContextPromotionListener.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ExecutionContextPromotionListener.java index e373454a5..acf84a58e 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ExecutionContextPromotionListener.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/ExecutionContextPromotionListener.java @@ -99,7 +99,7 @@ public class ExecutionContextPromotionListener extends StepExecutionListenerSupp * If set to TRUE, the listener will throw an exception if any 'key' is not * found in the Step {@link ExecutionContext}. FALSE by default. * - * @param strict boolean value to establish the state of the strict flag. + * @param strict boolean the value of the flag. */ public void setStrict(boolean strict) { this.strict = strict; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerMetaData.java b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerMetaData.java index 1ba186aa1..3a99e9838 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerMetaData.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/listener/StepListenerMetaData.java @@ -91,7 +91,7 @@ public enum StepListenerMetaData implements ListenerMetaData { } static{ - propertyMap = new HashMap(); + propertyMap = new HashMap<>(); for(StepListenerMetaData metaData : values()){ propertyMap.put(metaData.getPropertyName(), metaData); } @@ -125,7 +125,7 @@ public enum StepListenerMetaData implements ListenerMetaData { /** * Return the relevant meta data for the provided property name. * - * @param propertyName name of the {@link StepListenerMetaData} to retrieve. + * @param propertyName property name to retrieve data for. * @return meta data with supplied property name, null if none exists. */ public static StepListenerMetaData fromPropertyName(String propertyName){ diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/DefaultExecutionContextSerializer.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/DefaultExecutionContextSerializer.java index 7af67da0a..50aa10c04 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/DefaultExecutionContextSerializer.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/DefaultExecutionContextSerializer.java @@ -46,7 +46,7 @@ public class DefaultExecutionContextSerializer implements ExecutionContextSerial * Serializes an execution context to the provided {@link OutputStream}. The * stream is not closed prior to it's return. * - * @param context {@link Map} containing the context information. + * @param context {@link Map} contents of the {@code ExecutionContext}. * @param out {@link OutputStream} where the serialized context information * will be written. */ 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 09ac482de..26da45009 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 @@ -98,7 +98,7 @@ public class JdbcExecutionContextDao extends AbstractJdbcBatchMetadataDao implem * Default value is 2500. Clients using multi-bytes charsets on the database * server may need to reduce this value to as little as half the value of * the column size. - * @param shortContextLength int containing the shortContextLength. + * @param shortContextLength int max length of the short context. */ public void setShortContextLength(int shortContextLength) { this.shortContextLength = shortContextLength; diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JobExecutionDao.java b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JobExecutionDao.java index ead2b5543..18b5f4bc0 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JobExecutionDao.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JobExecutionDao.java @@ -54,7 +54,7 @@ public interface JobExecutionDao { * Return all {@link JobExecution}s for given {@link JobInstance}, sorted * backwards by creation order (so the first element is the most recent). * - * @param jobInstance {@link JobInstance} instance to find. + * @param jobInstance parent {@link JobInstance} of the {@link JobExecution}s to find. * @return {@link List} containing JobExecutions for the jobInstance. */ List findJobExecutions(JobInstance jobInstance); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java index 7fbe31834..492388bcf 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/AbstractStep.java @@ -83,7 +83,7 @@ public abstract class AbstractStep implements Step, InitializingBean, BeanNameAw /** * Set the name property. Always overrides the default value if this object is a Spring bean. - * @param name the name to use for the {@link Step}. + * @param name the name of the {@link Step}. * @see #setBeanName(java.lang.String) */ public void setName(String name) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/FaultTolerantStepBuilder.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/FaultTolerantStepBuilder.java index 719447335..e2b6d727a 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/FaultTolerantStepBuilder.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/builder/FaultTolerantStepBuilder.java @@ -359,7 +359,7 @@ public class FaultTolerantStepBuilder extends SimpleStepBuilder { /** * Explicitly request certain exceptions (and subclasses) to be skipped. * - * @param type the class type. + * @param type the exception type. * @return this for fluent chaining */ public FaultTolerantStepBuilder skip(Class type) { diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/FaultTolerantStepFactoryBean.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/FaultTolerantStepFactoryBean.java index c64c24e6b..96a1cc5ba 100755 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/FaultTolerantStepFactoryBean.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/factory/FaultTolerantStepFactoryBean.java @@ -209,7 +209,7 @@ public class FaultTolerantStepFactoryBean extends SimpleStepFactoryBean implements ChunkProcessor, Initializi /** * Call the listener's after write method. * - * @param items list of items that will be passed to {@link MulticasterBatchListener#afterWrite(List)}. + * @param items list of items that were just written. */ protected final void doAfterWrite(List items) { listener.afterWrite(items); @@ -169,8 +169,8 @@ public class SimpleChunkProcessor implements ChunkProcessor, Initializi /** * Call listener's writerError method. - * @param e exception that occured. - * @param items list of items that will be passed to {@link MulticasterBatchListener#onWriteError(Exception, List)}. + * @param e exception that occurred. + * @param items list of items that failed to be written. */ protected final void doOnWriteError(Exception e, List items) { listener.onWriteError(e, items); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/SkipWrapper.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/SkipWrapper.java index f7c55fa92..854e375ba 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/SkipWrapper.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/item/SkipWrapper.java @@ -29,14 +29,14 @@ public class SkipWrapper { final private T item; /** - * @param item the item that is associated with the SkipWrapper. + * @param item the item being wrapped. */ public SkipWrapper(T item) { this(item, null); } /** - * @param e instance of {@link Throwable} that is associated with the SkipWrapper. + * @param e instance of {@link Throwable} that being wrapped. */ public SkipWrapper(Throwable e) { this(null, e); diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/SystemCommandTasklet.java b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/SystemCommandTasklet.java index 3df4b8a3b..d400febf8 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/SystemCommandTasklet.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/step/tasklet/SystemCommandTasklet.java @@ -235,7 +235,7 @@ public class SystemCommandTasklet extends StepExecutionListenerSupport implement * executing the system command if {@link #setTimeout(long)} has been * exceeded or user interrupts the job. false by default * - * @param interruptOnCancel boolean to establish state of interruptOnCancel + * @param interruptOnCancel boolean determines if process should be interrupted */ public void setInterruptOnCancel(boolean interruptOnCancel) { this.interruptOnCancel = interruptOnCancel;