fix up code formatting and typo
This commit is contained in:
committed by
Mahmoud Ben Hassine
parent
61bec2805d
commit
c2b0a208c3
@@ -99,7 +99,7 @@ public class ConcurrentTransactionTests {
|
||||
|
||||
/**
|
||||
* This datasource configuration configures the HSQLDB instance using MVCC. When
|
||||
* configurd using the default behavior, transaction serialization errors are
|
||||
* configured using the default behavior, transaction serialization errors are
|
||||
* thrown (default configuration example below).
|
||||
*
|
||||
* return new PooledEmbeddedDataSource(new EmbeddedDatabaseBuilder().
|
||||
|
||||
@@ -29,8 +29,8 @@ public class SkipListenerAdapter<T, S> implements SkipListener<T, S> {
|
||||
private final SkipProcessListener skipProcessDelegate;
|
||||
private final SkipWriteListener skipWriteDelegate;
|
||||
|
||||
public SkipListenerAdapter(SkipReadListener skipReadDelgate, SkipProcessListener skipProcessDelegate, SkipWriteListener skipWriteDelegate) {
|
||||
this.skipReadDelegate = skipReadDelgate;
|
||||
public SkipListenerAdapter(SkipReadListener skipReadDelegate, SkipProcessListener skipProcessDelegate, SkipWriteListener skipWriteDelegate) {
|
||||
this.skipReadDelegate = skipReadDelegate;
|
||||
this.skipProcessDelegate = skipProcessDelegate;
|
||||
this.skipWriteDelegate = skipWriteDelegate;
|
||||
}
|
||||
|
||||
@@ -61,17 +61,17 @@ public class BatchParser extends AbstractBeanDefinitionParser {
|
||||
|
||||
if(beanElements.size() > 0) {
|
||||
for (Element curElement : beanElements) {
|
||||
AbstractBeanDefinition beanDefintion = BeanDefinitionBuilder.genericBeanDefinition(curElement.getAttribute("class"))
|
||||
AbstractBeanDefinition beanDefinition = BeanDefinitionBuilder.genericBeanDefinition(curElement.getAttribute("class"))
|
||||
.getBeanDefinition();
|
||||
|
||||
beanDefintion.setScope("step");
|
||||
beanDefinition.setScope("step");
|
||||
|
||||
String beanName = curElement.getAttribute("id");
|
||||
|
||||
if(!registry.containsBeanDefinition(beanName)) {
|
||||
registry.registerBeanDefinition(beanName, beanDefintion);
|
||||
registry.registerBeanDefinition(beanName, beanDefinition);
|
||||
} else {
|
||||
logger.info("Ignoring batch.xml bean defintion for " + beanName + " because another bean of the same name has been registered");
|
||||
logger.info("Ignoring batch.xml bean definition for " + beanName + " because another bean of the same name has been registered");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ public class SimpleJobLauncher implements JobLauncher, InitializingBean {
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the JobRepsitory.
|
||||
* Set the JobRepository.
|
||||
*
|
||||
* @param jobRepository instance of {@link JobRepository}.
|
||||
*/
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.springframework.util.Assert;
|
||||
* @since 2.0
|
||||
* @see ExecutionContextSerializer
|
||||
* @deprecated Due to the incompattabilities between current Jettison versions and XStream
|
||||
* versions, this serializer is depricated in favor of
|
||||
* versions, this serializer is deprecated in favor of
|
||||
* {@link Jackson2ExecutionContextStringSerializer}
|
||||
*/
|
||||
@Deprecated
|
||||
|
||||
@@ -140,7 +140,7 @@ public class SimpleStepExecutionSplitterTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testUnkownStatus() throws Exception {
|
||||
public void testUnknownStatus() throws Exception {
|
||||
SimpleStepExecutionSplitter provider = new SimpleStepExecutionSplitter(jobRepository, true, step.getName(),
|
||||
new SimplePartitioner());
|
||||
Set<StepExecution> split = provider.split(stepExecution, 2);
|
||||
|
||||
@@ -197,7 +197,7 @@ public abstract class AbstractJobDaoTests {
|
||||
}
|
||||
|
||||
@Transactional @Test
|
||||
public void testUpdateNullIdJobExection() {
|
||||
public void testUpdateNullIdJobExecution() {
|
||||
|
||||
JobExecution execution = new JobExecution(jobInstance, jobParameters);
|
||||
try {
|
||||
|
||||
@@ -122,13 +122,13 @@ public class RepositoryItemWriterBuilder<T> {
|
||||
* not be final.
|
||||
*/
|
||||
public static class RepositoryMethodReference<T> {
|
||||
private RepositoryItemWriterBuilder.RepositoryMethodIterceptor repositoryInvocationHandler;
|
||||
private RepositoryMethodInterceptor repositoryInvocationHandler;
|
||||
|
||||
private CrudRepository<?, ?> repository;
|
||||
|
||||
public RepositoryMethodReference(CrudRepository<?, ?> repository) {
|
||||
this.repository = repository;
|
||||
this.repositoryInvocationHandler = new RepositoryItemWriterBuilder.RepositoryMethodIterceptor();
|
||||
this.repositoryInvocationHandler = new RepositoryMethodInterceptor();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -152,7 +152,7 @@ public class RepositoryItemWriterBuilder<T> {
|
||||
}
|
||||
}
|
||||
|
||||
private static class RepositoryMethodIterceptor implements MethodInterceptor {
|
||||
private static class RepositoryMethodInterceptor implements MethodInterceptor {
|
||||
private String methodName;
|
||||
|
||||
@Override
|
||||
|
||||
@@ -374,7 +374,7 @@ implements InitializingBean {
|
||||
public abstract String getSql();
|
||||
|
||||
/**
|
||||
* Check the result set is in synch with the currentRow attribute. This is
|
||||
* Check the result set is in sync with the currentRow attribute. This is
|
||||
* important to ensure that the user hasn't modified the current row.
|
||||
*/
|
||||
private void verifyCursorPosition(long expectedCurrentRow) throws SQLException {
|
||||
@@ -485,7 +485,7 @@ implements InitializingBean {
|
||||
|
||||
/**
|
||||
* Read the cursor and map to the type of object this reader should return. This method must be
|
||||
* overriden by subclasses.
|
||||
* overridden by subclasses.
|
||||
*
|
||||
* @param rs The current result set
|
||||
* @param currentRow Current position of the result set
|
||||
|
||||
@@ -143,7 +143,7 @@ public class MultiResourceItemWriter<T> extends AbstractItemStreamItemWriter<T>
|
||||
|
||||
@Override
|
||||
public void close() throws ItemStreamException {
|
||||
super.close();
|
||||
super.close();
|
||||
resourceIndex = 1;
|
||||
currentResourceItemCount = 0;
|
||||
if (opened) {
|
||||
@@ -153,7 +153,7 @@ public class MultiResourceItemWriter<T> extends AbstractItemStreamItemWriter<T>
|
||||
|
||||
@Override
|
||||
public void open(ExecutionContext executionContext) throws ItemStreamException {
|
||||
super.open(executionContext);
|
||||
super.open(executionContext);
|
||||
resourceIndex = executionContext.getInt(getExecutionContextKey(RESOURCE_INDEX_KEY), 1);
|
||||
currentResourceItemCount = executionContext.getInt(getExecutionContextKey(CURRENT_RESOURCE_ITEM_COUNT), 0);
|
||||
|
||||
@@ -176,7 +176,7 @@ public class MultiResourceItemWriter<T> extends AbstractItemStreamItemWriter<T>
|
||||
|
||||
@Override
|
||||
public void update(ExecutionContext executionContext) throws ItemStreamException {
|
||||
super.update(executionContext);
|
||||
super.update(executionContext);
|
||||
if (saveState) {
|
||||
if (opened) {
|
||||
delegate.update(executionContext);
|
||||
|
||||
@@ -21,7 +21,7 @@ import java.util.Arrays;
|
||||
import org.springframework.batch.repeat.RepeatContext;
|
||||
|
||||
/**
|
||||
* Composiste {@link ExceptionHandler} that loops though a list of delegates.
|
||||
* Composite {@link ExceptionHandler} that loops though a list of delegates.
|
||||
*
|
||||
* @author Dave Syer
|
||||
*
|
||||
|
||||
@@ -47,12 +47,12 @@ public class RepeatOperationsInterceptor implements MethodInterceptor {
|
||||
/**
|
||||
* Setter for the {@link RepeatOperations}.
|
||||
*
|
||||
* @param batchTempate template to be used
|
||||
* @param batchTemplate template to be used
|
||||
* @throws IllegalArgumentException if the argument is null.
|
||||
*/
|
||||
public void setRepeatOperations(RepeatOperations batchTempate) {
|
||||
Assert.notNull(batchTempate, "'repeatOperations' cannot be null.");
|
||||
this.repeatOperations = batchTempate;
|
||||
public void setRepeatOperations(RepeatOperations batchTemplate) {
|
||||
Assert.notNull(batchTemplate, "'repeatOperations' cannot be null.");
|
||||
this.repeatOperations = batchTemplate;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,7 +52,7 @@ public class TimeoutTerminationPolicy extends CompletionPolicySupport {
|
||||
* Construct a {@link TimeoutTerminationPolicy} with the specified timeout
|
||||
* value (in milliseconds).
|
||||
*
|
||||
* @param timeout durration of the timeout.
|
||||
* @param timeout duration of the timeout.
|
||||
*/
|
||||
public TimeoutTerminationPolicy(long timeout) {
|
||||
super();
|
||||
|
||||
@@ -85,7 +85,7 @@ public class RepositoryItemWriterBuilderTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWriteItemsTestRepsository() throws Exception {
|
||||
public void testWriteItemsTestRepository() throws Exception {
|
||||
RepositoryItemWriter<String> writer = new RepositoryItemWriterBuilder<String>()
|
||||
.methodName("foo")
|
||||
.repository(this.repository)
|
||||
@@ -99,7 +99,7 @@ public class RepositoryItemWriterBuilderTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWriteItemsTestRepsositoryMethodIs() throws Exception {
|
||||
public void testWriteItemsTestRepositoryMethodIs() throws Exception {
|
||||
RepositoryItemWriterBuilder.RepositoryMethodReference<TestRepository>
|
||||
repositoryMethodReference = new RepositoryItemWriterBuilder.RepositoryMethodReference<>(
|
||||
this.repository);
|
||||
|
||||
@@ -61,12 +61,12 @@ public class CompositeItemProcessorTests {
|
||||
@Test
|
||||
public void testTransform() throws Exception {
|
||||
Object item = new Object();
|
||||
Object itemAfterFirstTransfromation = new Object();
|
||||
Object itemAfterFirstTransformation = new Object();
|
||||
Object itemAfterSecondTransformation = new Object();
|
||||
|
||||
when(processor1.process(item)).thenReturn(itemAfterFirstTransfromation);
|
||||
when(processor1.process(item)).thenReturn(itemAfterFirstTransformation);
|
||||
|
||||
when(processor2.process(itemAfterFirstTransfromation)).thenReturn(itemAfterSecondTransformation);
|
||||
when(processor2.process(itemAfterFirstTransformation)).thenReturn(itemAfterSecondTransformation);
|
||||
|
||||
assertSame(itemAfterSecondTransformation, composite.process(item));
|
||||
|
||||
|
||||
@@ -57,13 +57,13 @@ public class CompositeItemProcessorBuilderTests {
|
||||
@Test
|
||||
public void testTransform() throws Exception {
|
||||
Object item = new Object();
|
||||
Object itemAfterFirstTransfromation = new Object();
|
||||
Object itemAfterFirstTransformation = new Object();
|
||||
Object itemAfterSecondTransformation = new Object();
|
||||
CompositeItemProcessor<Object, Object> composite = new CompositeItemProcessorBuilder<>()
|
||||
.delegates(this.processors).build();
|
||||
|
||||
when(processor1.process(item)).thenReturn(itemAfterFirstTransfromation);
|
||||
when(processor2.process(itemAfterFirstTransfromation)).thenReturn(itemAfterSecondTransformation);
|
||||
when(processor1.process(item)).thenReturn(itemAfterFirstTransformation);
|
||||
when(processor2.process(itemAfterFirstTransformation)).thenReturn(itemAfterSecondTransformation);
|
||||
|
||||
assertSame(itemAfterSecondTransformation, composite.process(item));
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ public class StaxEventItemReaderTests {
|
||||
@Before
|
||||
public void setUp() throws Exception {
|
||||
this.executionContext = new ExecutionContext();
|
||||
source = createNewInputSouce();
|
||||
source = createNewInputSource();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -105,7 +105,7 @@ public class StaxEventItemReaderTests {
|
||||
@Test
|
||||
public void testAfterPropertesSetException() throws Exception {
|
||||
|
||||
source = createNewInputSouce();
|
||||
source = createNewInputSource();
|
||||
source.setFragmentRootElementName("");
|
||||
try {
|
||||
source.afterPropertiesSet();
|
||||
@@ -115,7 +115,7 @@ public class StaxEventItemReaderTests {
|
||||
// expected
|
||||
}
|
||||
|
||||
source = createNewInputSouce();
|
||||
source = createNewInputSource();
|
||||
source.setUnmarshaller(null);
|
||||
try {
|
||||
source.afterPropertiesSet();
|
||||
@@ -144,7 +144,7 @@ public class StaxEventItemReaderTests {
|
||||
|
||||
@Test
|
||||
public void testItemCountAwareFragment() throws Exception {
|
||||
StaxEventItemReader<ItemCountAwareFragment> source = createNewItemCountAwareInputSouce();
|
||||
StaxEventItemReader<ItemCountAwareFragment> source = createNewItemCountAwareInputSource();
|
||||
source.afterPropertiesSet();
|
||||
source.open(executionContext);
|
||||
assertEquals(1, source.read().getItemCount());
|
||||
@@ -156,13 +156,13 @@ public class StaxEventItemReaderTests {
|
||||
|
||||
@Test
|
||||
public void testItemCountAwareFragmentRestart() throws Exception {
|
||||
StaxEventItemReader<ItemCountAwareFragment> source = createNewItemCountAwareInputSouce();
|
||||
StaxEventItemReader<ItemCountAwareFragment> source = createNewItemCountAwareInputSource();
|
||||
source.afterPropertiesSet();
|
||||
source.open(executionContext);
|
||||
assertEquals(1, source.read().getItemCount());
|
||||
source.update(executionContext);
|
||||
source.close();
|
||||
source = createNewItemCountAwareInputSouce();
|
||||
source = createNewItemCountAwareInputSource();
|
||||
source.afterPropertiesSet();
|
||||
source.open(executionContext);
|
||||
assertEquals(2, source.read().getItemCount());
|
||||
@@ -267,7 +267,7 @@ public class StaxEventItemReaderTests {
|
||||
|
||||
source.close();
|
||||
|
||||
source = createNewInputSouce();
|
||||
source = createNewInputSource();
|
||||
source.setResource(new ByteArrayResource(xmlMultiFragment.getBytes()));
|
||||
source.setFragmentRootElementNames(MULTI_FRAGMENT_ROOT_ELEMENTS);
|
||||
source.afterPropertiesSet();
|
||||
@@ -311,7 +311,7 @@ public class StaxEventItemReaderTests {
|
||||
|
||||
source.close();
|
||||
|
||||
source = createNewInputSouce();
|
||||
source = createNewInputSource();
|
||||
source.setResource(new ByteArrayResource(xmlMultiFragment.getBytes()));
|
||||
source.setFragmentRootElementNames(MULTI_FRAGMENT_ROOT_ELEMENTS);
|
||||
source.afterPropertiesSet();
|
||||
@@ -374,7 +374,7 @@ public class StaxEventItemReaderTests {
|
||||
assertEquals(1, executionContext.getInt(ClassUtils.getShortName(StaxEventItemReader.class) + ".read.count"));
|
||||
List<XMLEvent> expectedAfterRestart = source.read();
|
||||
|
||||
source = createNewInputSouce();
|
||||
source = createNewInputSource();
|
||||
source.open(executionContext);
|
||||
List<XMLEvent> afterRestart = source.read();
|
||||
assertEquals(expectedAfterRestart.size(), afterRestart.size());
|
||||
@@ -396,7 +396,7 @@ public class StaxEventItemReaderTests {
|
||||
|
||||
assertEquals(3, executionContext.getInt(ClassUtils.getShortName(StaxEventItemReader.class) + ".read.count"));
|
||||
|
||||
source = createNewInputSouce();
|
||||
source = createNewInputSource();
|
||||
source.open(executionContext);
|
||||
assertNull(source.read());
|
||||
}
|
||||
@@ -596,7 +596,7 @@ public class StaxEventItemReaderTests {
|
||||
|
||||
}
|
||||
|
||||
private StaxEventItemReader<List<XMLEvent>> createNewInputSouce() {
|
||||
private StaxEventItemReader<List<XMLEvent>> createNewInputSource() {
|
||||
Resource resource = new ByteArrayResource(xml.getBytes());
|
||||
|
||||
StaxEventItemReader<List<XMLEvent>> newSource = new StaxEventItemReader<List<XMLEvent>>();
|
||||
@@ -609,7 +609,7 @@ public class StaxEventItemReaderTests {
|
||||
return newSource;
|
||||
}
|
||||
|
||||
private StaxEventItemReader<ItemCountAwareFragment> createNewItemCountAwareInputSouce() {
|
||||
private StaxEventItemReader<ItemCountAwareFragment> createNewItemCountAwareInputSource() {
|
||||
Resource resource = new ByteArrayResource(xml.getBytes());
|
||||
|
||||
StaxEventItemReader<ItemCountAwareFragment> newSource = new StaxEventItemReader<ItemCountAwareFragment>();
|
||||
|
||||
@@ -82,7 +82,7 @@ public class ReflectionUtilsTests {
|
||||
|
||||
@Transactional
|
||||
public String toString() {
|
||||
return "AnnoatedClass";
|
||||
return "AnnotatedClass";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ public class StagingItemWriter<T> extends JdbcDaoSupport implements StepExecutio
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @seeorg.springframework.batch.core.domain.StepListener#beforeStep(org.
|
||||
* @see org.springframework.batch.core.domain.StepListener#beforeStep(org.
|
||||
* springframework.batch.core.domain.StepExecution)
|
||||
*/
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user