Skip to content

Commit 1e819a6

Browse files
committed
Fix typos
1 parent 4dea8c2 commit 1e819a6

File tree

64 files changed

+170
-129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+170
-129
lines changed

spring-batch-core/src/main/java/org/springframework/batch/core/BatchStatus.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2007 the original author or authors.
2+
* Copyright 2006-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,11 +17,12 @@
1717
package org.springframework.batch.core;
1818

1919
/**
20-
* Enumeration representing the status of a an Execution.
20+
* Enumeration representing the status of an Execution.
2121
*
2222
* @author Lucas Ward
2323
* @author Dave Syer
2424
* @author Michael Minella
25+
* @author Mahmoud Ben Hassine
2526
*/
2627
public enum BatchStatus {
2728

spring-batch-core/src/main/java/org/springframework/batch/core/ChunkListener.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2013 the original author or authors.
2+
* Copyright 2006-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -19,11 +19,12 @@
1919

2020
/**
2121
* Listener interface for the lifecycle of a chunk. A chunk
22-
* can be through of as a collection of items that will be
22+
* can be thought of as a collection of items that will be
2323
* committed together.
2424
*
2525
* @author Lucas Ward
2626
* @author Michael Minella
27+
* @author Mahmoud Ben Hassine
2728
*
2829
*/
2930
public interface ChunkListener extends StepListener {
@@ -49,7 +50,7 @@ public interface ChunkListener extends StepListener {
4950
* after transaction rollback. While the rollback will have occurred,
5051
* transactional resources might still be active and accessible. Due to
5152
* this, data access code within this callback will still "participate" in
52-
* the original transaction unless it declares that it run in its own
53+
* the original transaction unless it declares that it runs in its own
5354
* transaction. Hence: <em> Use PROPAGATION_REQUIRES_NEW for any
5455
* transactional operation that is called from here.</em>
5556
*

spring-batch-core/src/main/java/org/springframework/batch/core/JobInstance.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2013 the original author or authors.
2+
* Copyright 2006-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,7 +23,7 @@
2323
* JobInstance can be restarted multiple times in case of execution failure and
2424
* it's lifecycle ends with first successful execution.
2525
*
26-
* Trying to execute an existing JobIntance that has already completed
26+
* Trying to execute an existing JobInstance that has already completed
2727
* successfully will result in error. Error will be raised also for an attempt
2828
* to restart a failed JobInstance if the Job is not restartable.
2929
*
@@ -36,6 +36,7 @@
3636
* @author Dave Syer
3737
* @author Robert Kasanicky
3838
* @author Michael Minella
39+
* @author Mahmoud Ben Hassine
3940
*
4041
*/
4142
@SuppressWarnings("serial")

spring-batch-core/src/main/java/org/springframework/batch/core/JobParametersBuilder.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2013 the original author or authors.
2+
* Copyright 2006-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -40,6 +40,7 @@
4040
* @author Lucas Ward
4141
* @author Michael Minella
4242
* @author Glenn Renfro
43+
* @author Mahmoud Ben Hassine
4344
* @since 1.0
4445
* @see JobParameters
4546
* @see JobParameter
@@ -201,7 +202,7 @@ public JobParametersBuilder addDouble(String key, Double parameter, boolean iden
201202

202203
/**
203204
* Conversion method that takes the current state of this builder and
204-
* returns it as a JobruntimeParameters object.
205+
* returns it as a JobParameters object.
205206
*
206207
* @return a valid {@link JobParameters} object.
207208
*/

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2014 the original author or authors.
2+
* Copyright 2014-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,11 +16,12 @@
1616
package org.springframework.batch.core.configuration;
1717

1818
/**
19-
* Represents an error has occured in the configuration of base batch
19+
* Represents an error has occurred in the configuration of base batch
2020
* infrastructure (creation of a {@link org.springframework.batch.core.repository.JobRepository}
2121
* for example.
2222
*
2323
* @author Michael Minella
24+
* @author Mahmoud Ben Hassine
2425
* @since 2.2.6
2526
*/
2627
public class BatchConfigurationException extends RuntimeException {

spring-batch-core/src/main/java/org/springframework/batch/core/job/DefaultJobParametersValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public DefaultJobParametersValidator(String[] requiredKeys, String[] optionalKey
6868
@Override
6969
public void afterPropertiesSet() throws IllegalStateException {
7070
for (String key : requiredKeys) {
71-
Assert.state(!optionalKeys.contains(key), "Optional keys canot be required: " + key);
71+
Assert.state(!optionalKeys.contains(key), "Optional keys cannot be required: " + key);
7272
}
7373
}
7474

spring-batch-core/src/main/java/org/springframework/batch/core/jsr/ItemProcessListenerAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class ItemProcessListenerAdapter<T,S> implements ItemProcessListener<T, S
3737
* @param delegate to be called within the batch lifecycle
3838
*/
3939
public ItemProcessListenerAdapter(javax.batch.api.chunk.listener.ItemProcessListener delegate) {
40-
Assert.notNull(delegate, "An ItemProcessListener is requred");
40+
Assert.notNull(delegate, "An ItemProcessListener is required");
4141
this.delegate = delegate;
4242
}
4343

spring-batch-core/src/main/java/org/springframework/batch/core/jsr/JsrJobParametersConverter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
public class JsrJobParametersConverter implements JobParametersConverter, InitializingBean {
4949

5050
public static final String JOB_RUN_ID = "jsr_batch_run_id";
51-
public DataFieldMaxValueIncrementer incremeter;
51+
public DataFieldMaxValueIncrementer incrementer;
5252
public String tablePrefix = AbstractJdbcBatchMetadataDao.DEFAULT_TABLE_PREFIX;
5353
public DataSource dataSource;
5454

@@ -75,7 +75,7 @@ public void setTablePrefix(String tablePrefix) {
7575
public void afterPropertiesSet() throws Exception {
7676
DataFieldMaxValueIncrementerFactory factory = new DefaultDataFieldMaxValueIncrementerFactory(dataSource);
7777

78-
this.incremeter = factory.getIncrementer(DatabaseType.fromMetaData(dataSource).name(), tablePrefix + "JOB_SEQ");
78+
this.incrementer = factory.getIncrementer(DatabaseType.fromMetaData(dataSource).name(), tablePrefix + "JOB_SEQ");
7979
}
8080

8181
/* (non-Javadoc)
@@ -100,7 +100,7 @@ public JobParameters getJobParameters(Properties properties) {
100100
}
101101

102102
if(!runIdFound) {
103-
builder.addLong(JOB_RUN_ID, incremeter.nextLongValue());
103+
builder.addLong(JOB_RUN_ID, incrementer.nextLongValue());
104104
}
105105

106106
return builder.toJobParameters();
@@ -125,7 +125,7 @@ public Properties getProperties(JobParameters params) {
125125
}
126126

127127
if(!runIdFound) {
128-
properties.setProperty(JOB_RUN_ID, String.valueOf(incremeter.nextLongValue()));
128+
properties.setProperty(JOB_RUN_ID, String.valueOf(incrementer.nextLongValue()));
129129
}
130130

131131
return properties;

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2014 the original author or authors.
2+
* Copyright 2013-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -51,6 +51,7 @@
5151
* </p>
5252
*
5353
* @author Chris Schaefer
54+
* @author Mahmoud Ben Hassine
5455
* @since 3.0
5556
*/
5657
public class JsrBeanDefinitionDocumentReader extends DefaultBeanDefinitionDocumentReader {
@@ -64,7 +65,7 @@ public class JsrBeanDefinitionDocumentReader extends DefaultBeanDefinitionDocume
6465
private static final String JOB_PARAMETERS_KEY_NAME = "jobParameters";
6566
private static final String JOB_PARAMETERS_BEAN_DEFINITION_NAME = "jsr_jobParameters";
6667
private static final Log LOG = LogFactory.getLog(JsrBeanDefinitionDocumentReader.class);
67-
private static final Pattern PROPERTY_KEY_SEPERATOR = Pattern.compile("'([^']*?)'");
68+
private static final Pattern PROPERTY_KEY_SEPARATOR = Pattern.compile("'([^']*?)'");
6869
private static final Pattern OPERATOR_PATTERN = Pattern.compile("(#\\{(job(Properties|Parameters))[^}]+\\})");
6970

7071
private BeanDefinitionRegistry beanDefinitionRegistry;
@@ -114,9 +115,9 @@ private Properties initJobParameters() {
114115
Properties jobParameters = new Properties();
115116

116117
if (getBeanDefinitionRegistry().containsBeanDefinition(JOB_PARAMETERS_BEAN_DEFINITION_NAME)) {
117-
BeanDefinition beanDefintion = getBeanDefinitionRegistry().getBeanDefinition(JOB_PARAMETERS_BEAN_DEFINITION_NAME);
118+
BeanDefinition beanDefinition = getBeanDefinitionRegistry().getBeanDefinition(JOB_PARAMETERS_BEAN_DEFINITION_NAME);
118119

119-
Properties properties = (Properties) beanDefintion.getConstructorArgumentValues()
120+
Properties properties = (Properties) beanDefinition.getConstructorArgumentValues()
120121
.getGenericArgumentValue(Properties.class)
121122
.getValue();
122123

@@ -185,7 +186,7 @@ private String resolveValue(String value) {
185186
Matcher jobParameterMatcher = OPERATOR_PATTERN.matcher(value);
186187

187188
while (jobParameterMatcher.find()) {
188-
Matcher jobParameterKeyMatcher = PROPERTY_KEY_SEPERATOR.matcher(jobParameterMatcher.group(1));
189+
Matcher jobParameterKeyMatcher = PROPERTY_KEY_SEPARATOR.matcher(jobParameterMatcher.group(1));
189190

190191
if (jobParameterKeyMatcher.find()) {
191192
String propertyType = jobParameterMatcher.group(2);

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2014 the original author or authors.
2+
* Copyright 2013-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -35,6 +35,7 @@
3535
* Parser for the &lt;partition&gt; element as defined by JSR-352.
3636
*
3737
* @author Michael Minella
38+
* @author Mahmoud Ben Hassine
3839
* @since 3.0
3940
*/
4041
public class PartitionParser {
@@ -63,7 +64,7 @@ public class PartitionParser {
6364

6465
/**
6566
* @param stepName the name of the step that is being partitioned
66-
* @param allowStartIfComplete boolean to establish the allowStartIfComplete property for parition properties.
67+
* @param allowStartIfComplete boolean to establish the allowStartIfComplete property for partition properties.
6768
*/
6869
public PartitionParser(String stepName, boolean allowStartIfComplete) {
6970
this.name = stepName;
@@ -82,7 +83,7 @@ public void parse(Element element, AbstractBeanDefinition bd, ParserContext pars
8283
properties.addPropertyValue("jobRepository", new RuntimeBeanReference("jobRepository"));
8384
properties.addPropertyValue("allowStartIfComplete", allowStartIfComplete);
8485

85-
paserMapperElement(element, parserContext, properties);
86+
parseMapperElement(element, parserContext, properties);
8687
parsePartitionPlan(element, parserContext, stepName, properties);
8788
parseAnalyzerElement(element, parserContext, properties);
8889
parseReducerElement(element, parserContext, factoryBeanProperties);
@@ -136,7 +137,7 @@ private void parseAnalyzerElement(Element element,
136137
}
137138
}
138139

139-
private void paserMapperElement(Element element,
140+
private void parseMapperElement(Element element,
140141
ParserContext parserContext, MutablePropertyValues properties) {
141142
Element mapperElement = DomUtils.getChildElementByTagName(element, MAPPER_ELEMENT);
142143

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2014 the original author or authors.
2+
* Copyright 2013-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@
3737
* @author Michael Minella
3838
* @author Glenn Renfro
3939
* @author Chris Schaefer
40+
* @author Mahmoud Ben Hassine
4041
* @since 3.0
4142
*/
4243
public class StepParser extends AbstractSingleBeanDefinitionParser {
@@ -67,11 +68,11 @@ protected Collection<BeanDefinition> parse(Element element, ParserContext parser
6768
}
6869

6970
String allowStartIfComplete = element.getAttribute(ALLOW_START_IF_COMPLETE_ATTRIBUTE);
70-
boolean allowStartIfCompletValue = false;
71+
boolean allowStartIfCompleteValue = false;
7172
if(StringUtils.hasText(allowStartIfComplete)) {
7273
bd.getPropertyValues().addPropertyValue("allowStartIfComplete",
7374
allowStartIfComplete);
74-
allowStartIfCompletValue = Boolean.valueOf(allowStartIfComplete);
75+
allowStartIfCompleteValue = Boolean.valueOf(allowStartIfComplete);
7576
}
7677

7778
new ListenerParser(JsrStepListenerFactoryBean.class, "listeners").parseListeners(element, parserContext, bd, stepName);
@@ -92,7 +93,7 @@ protected Collection<BeanDefinition> parse(Element element, ParserContext parser
9293
} else if(name.equals(CHUNK_ELEMENT)) {
9394
new ChunkParser().parse(nestedElement, bd, parserContext, stepName);
9495
} else if(name.equals(PARTITION_ELEMENT)) {
95-
new PartitionParser(stepName, allowStartIfCompletValue).parse(nestedElement, bd, parserContext, stepName);
96+
new PartitionParser(stepName, allowStartIfCompleteValue).parse(nestedElement, bd, parserContext, stepName);
9697
}
9798
}
9899
}

spring-batch-core/src/main/java/org/springframework/batch/core/jsr/partition/PartitionCollectorAdapter.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013-2014 the original author or authors.
2+
* Copyright 2013-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -33,6 +33,7 @@
3333
* the PartitionCollector will be placed.
3434
*
3535
* @author Michael Minella
36+
* @author Mahmoud Ben Hassine
3637
* @since 3.0
3738
*/
3839
public class PartitionCollectorAdapter implements ChunkListener {
@@ -69,7 +70,7 @@ public void afterChunk(ChunkContext context) {
6970
}
7071
}
7172
} catch (Throwable e) {
72-
throw new BatchRuntimeException("An error occured while collecting data from the PartionCollector", e);
73+
throw new BatchRuntimeException("An error occurred while collecting data from the PartitionCollector", e);
7374
} finally {
7475
if(lock.isHeldByCurrentThread()) {
7576
lock.unlock();
@@ -89,7 +90,7 @@ public void afterChunkError(ChunkContext context) {
8990
}
9091
}
9192
} catch (Throwable e) {
92-
throw new BatchRuntimeException("An error occured while collecting data from the PartionCollector", e);
93+
throw new BatchRuntimeException("An error occurred while collecting data from the PartitionCollector", e);
9394
} finally {
9495
if(lock.isHeldByCurrentThread()) {
9596
lock.unlock();

spring-batch-core/src/main/java/org/springframework/batch/core/jsr/step/builder/JsrBatchletStepBuilder.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2013 the original author or authors.
2+
* Copyright 2013-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -32,14 +32,15 @@
3232
* of a {@link TaskletStep}.
3333
*
3434
* @author Michael Minella
35+
* @author Mahmoud Ben Hassine
3536
* @since 3.0
3637
*/
3738
public class JsrBatchletStepBuilder extends TaskletStepBuilder {
3839

3940
private BatchPropertyContext batchPropertyContext;
4041

4142
/**
42-
* @param context used to resolve lazy binded properties
43+
* @param context used to resolve lazy bound properties
4344
*/
4445
public void setBatchPropertyContext(BatchPropertyContext context) {
4546
this.batchPropertyContext = context;

spring-batch-core/src/main/java/org/springframework/batch/core/launch/support/SimpleJobLauncher.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2006-2014 the original author or authors.
2+
* Copyright 2006-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -56,6 +56,7 @@
5656
* @author Dave Syer
5757
* @author Will Schipp
5858
* @author Michael Minella
59+
* @author Mahmoud Ben Hassine
5960
*
6061
* @since 1.0
6162
*
@@ -78,7 +79,9 @@ public class SimpleJobLauncher implements JobLauncher, InitializingBean {
7879
* @param job the job to be run.
7980
* @param jobParameters the {@link JobParameters} for this particular
8081
* execution.
81-
* @return JobExecutionAlreadyRunningException if the JobInstance already
82+
* @return the {@link JobExecution} if it returns synchronously. If the
83+
* implementation is asynchronous, the status might well be unknown.
84+
* @throws JobExecutionAlreadyRunningException if the JobInstance already
8285
* exists and has an execution already running.
8386
* @throws JobRestartException if the execution would be a re-start, but a
8487
* re-start is either not allowed or not needed.

spring-batch-core/src/main/java/org/springframework/batch/core/repository/dao/JdbcJobExecutionDao.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,11 +229,11 @@ public void updateJobExecution(JobExecution jobExecution) {
229229

230230
// Avoid concurrent modifications...
231231
if (count == 0) {
232-
int curentVersion = getJdbcTemplate().queryForObject(getQuery(CURRENT_VERSION_JOB_EXECUTION), Integer.class,
232+
int currentVersion = getJdbcTemplate().queryForObject(getQuery(CURRENT_VERSION_JOB_EXECUTION), Integer.class,
233233
new Object[] { jobExecution.getId() });
234234
throw new OptimisticLockingFailureException("Attempt to update job execution id="
235235
+ jobExecution.getId() + " with wrong version (" + jobExecution.getVersion()
236-
+ "), where current version is " + curentVersion);
236+
+ "), where current version is " + currentVersion);
237237
}
238238

239239
jobExecution.incrementVersion();

0 commit comments

Comments
 (0)