Skip to content

Commit 59c8128

Browse files
author
Jay Bryant
committed
Further updates in response to feedback.
1 parent c73c5ec commit 59c8128

File tree

10 files changed

+25
-22
lines changed

10 files changed

+25
-22
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/StepRegistry.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
public interface StepRegistry {
3232

3333
/**
34-
* Registers all the step of the given job. If the job is already registered, the
34+
* Registers all the step instances of the given job. If the job is already registered, the
3535
* method {@link #unregisterStepsFromJob(String)} is called before registering the
3636
* given steps.
3737
* @param jobName the give job name
@@ -42,7 +42,7 @@ public interface StepRegistry {
4242
void register(String jobName, Collection<Step> steps) throws DuplicateJobException;
4343

4444
/**
45-
* Unregisters all the steps of the given job. If the job is not registered, nothing
45+
* Unregisters all the steps instances of the given job. If the job is not registered, nothing
4646
* happens.
4747
* @param jobName the given job name
4848
*/

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/annotation/EnableBatchProcessing.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
* annotation. Once you have an <code>&#064;EnableBatchProcessing</code> class in your configuration, you have an
9595
* instance of {@link StepScope} and {@link org.springframework.batch.core.scope.JobScope}, so your beans inside steps
9696
* can have <code>&#064;Scope("step")</code> and <code>&#064;Scope("job")</code> respectively. You can also
97-
* use <code>&#064;Autowired</code> to insert some useful stuff into your context:
97+
* use <code>&#064;Autowired</code> to insert some useful beans into your context:
9898
*
9999
* <ul>
100100
* <li>a {@link JobRepository} (bean name "jobRepository" of type {@link org.springframework.batch.core.repository.support.SimpleJobRepository})</li>

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/ApplicationContextJobFactory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ public class ApplicationContextJobFactory implements JobFactory {
3333

3434
/**
3535
* @param jobName the ID of the {@link Job} in the application context to be
36-
* created
36+
* created.
3737
* @param applicationContextFactory a factory for an application context
38-
* that contains a job with the job name provided
38+
* that contains a job with the job name provided.
3939
*/
4040
public ApplicationContextJobFactory(String jobName, ApplicationContextFactory applicationContextFactory) {
4141
@SuppressWarnings("resource")

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/support/AutomaticJobRegistrar.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void setApplicationContext(ApplicationContext applicationContext) {
7272
}
7373

7474
/**
75-
* Add some factories to the set that is used to load contexts and jobs.
75+
* Add a single {@link ApplicationContextFactory} to the set that is used to load contexts and jobs.
7676
*
7777
* @param applicationContextFactory the {@link ApplicationContextFactory} values to use
7878
*/
@@ -84,7 +84,7 @@ public void addApplicationContextFactory(ApplicationContextFactory applicationCo
8484
}
8585

8686
/**
87-
* Add some factories to the set that is used to load contexts and jobs.
87+
* Add an array of {@link ApplicationContextFactory} instances to the set that is used to load contexts and jobs.
8888
*
8989
* @param applicationContextFactories the {@link ApplicationContextFactory} values to use
9090
*/
@@ -166,7 +166,7 @@ public void start() {
166166
/**
167167
* Check whether this component has been started.
168168
*
169-
* @return {@code true} if started successfully and not stopped
169+
* @return {@code true} if started successfully and not stopped.
170170
* @see Lifecycle#isRunning()
171171
*/
172172
@Override

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/AbstractFlowParser.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ protected Class<?> getBeanClass(Element element) {
151151
}
152152

153153
/**
154-
* Performs the parsing.
154+
* Performs the parsing for a flow definition.
155155
*
156156
* @param element the top level element containing a flow definition
157157
* @param parserContext the {@link ParserContext}
@@ -284,6 +284,8 @@ public static Collection<BeanDefinition> getNextElements(ParserContext parserCon
284284
}
285285

286286
/**
287+
* Retrieve a list of {@link StateTransition} instances from a {@link ParserContext}.
288+
*
287289
* @param parserContext The parser context for the bean factory
288290
* @param stepId The ID of the current state if it is a step state, null
289291
* otherwise
@@ -333,6 +335,8 @@ else if (hasNextAttribute) {
333335
}
334336

335337
/**
338+
* Verifies that {@code transitionElement} is not in the list of state transition patterns.
339+
*
336340
* @param transitionElement The element to parse
337341
* @param patterns A list of patterns on state transitions for this element
338342
* @param element The {@link Element} representing the source.
@@ -431,7 +435,7 @@ protected static Collection<BeanDefinition> createTransition(FlowExecutionStatus
431435
* Gets the batch status from the end transition name by the element.
432436
*
433437
* @param elementName An end transition element name
434-
* @return the {@code BatchStatus} corresponding to the transition name.
438+
* @return the {@link BatchStatus} corresponding to the transition name.
435439
*/
436440
protected static FlowExecutionStatus getBatchStatusFromEndTransitionName(String elementName) {
437441
elementName = stripNamespace(elementName);

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/ChunkElementParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ else if (refElements.size() == 1) {
267267

268268
/**
269269
* Handle the adapter method attribute by using an
270-
* {@code AbstractMethodInvokingDelegator}.
270+
* {@link AbstractMethodInvokingDelegator}.
271271
*/
272272
private void handleAdapterMethodAttribute(String propertyName, String adapterClassName,
273273
MutablePropertyValues stepPvs, Element element) {

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/CoreNamespaceUtils.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,7 @@ public static boolean isAbstract(Element element) {
208208

209209
/**
210210
* Check that the schema location declared in the source file being parsed
211-
* matches the Spring Batch version. (The old 2.0 schema is not 100%
212-
* compatible with the new parser, so it is an error to explicitly define
213-
* 2.0. It might be an error to declare spring-batch.xsd as an alias, but
214-
* you are only going to find that out when one of the sub parses breaks.)
211+
* matches the Spring Batch version.
215212
*
216213
* @param element The element that is to be parsed next.
217214
* @return {@code true} if we find a schema declaration that matches.

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/SimpleFlowFactoryBean.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ private State getProxyState(State state) {
158158
* Provides an extension point to provide alternative {@link StepState}
159159
* implementations within a {@link SimpleFlow}.
160160
*
161-
* @param state The state that is used to create the StepState
162-
* @param oldName The name to be replaced
163-
* @param stateName The name for the new State
164-
* @return a state for the requested data
161+
* @param state The state that is used to create the {@code StepState}.
162+
* @param oldName The name to be replaced.
163+
* @param stateName The name for the new State.
164+
* @return a state for the requested data.
165165
*/
166166
protected State createNewStepState(State state, String oldName, String stateName) {
167167
return new StepState(stateName, ((StepState) state).getStep(oldName));

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/SplitParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class SplitParser {
5252
* reference.
5353
*
5454
* @param jobFactoryRef The reference to the {@link JobParserJobFactoryBean}
55-
* from the enclosing tag
55+
* from the enclosing tag.
5656
*/
5757
public SplitParser(String jobFactoryRef) {
5858
this.jobFactoryRef = jobFactoryRef;

spring-batch-core/src/main/java/org/springframework/batch/core/configuration/xml/StepParserStepFactoryBean.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -901,8 +901,10 @@ public void setKeyGenerator(KeyGenerator keyGenerator) {
901901
// =========================================================
902902

903903
/**
904-
* Public setter for the capacity of the cache in the retry policy. If more items than this fail without being
905-
* skipped or recovered, an exception will be thrown. This guards against inadvertent infinite loops generated
904+
*
905+
* Public setter for the capacity of the cache in the retry policy.
906+
* If there are more items than the specified capacity, the the step fails without being skipped or recovered,
907+
* and an exception is thrown. This guards against inadvertent infinite loops generated
906908
* by item identity problems.<br>
907909
* <br>
908910
* The default value should be high enough for most purposes. To breach the limit in a single-threaded step,

0 commit comments

Comments
 (0)