Remove duplicate job name (causing failures in test suite)
This commit is contained in:
@@ -44,6 +44,7 @@ import org.springframework.transaction.support.TransactionSynchronizationAdapter
|
||||
*/
|
||||
public class DefaultFlatFileItemReader extends SimpleFlatFileItemReader implements Skippable, Restartable,
|
||||
StatisticsProvider {
|
||||
|
||||
private static Log log = LogFactory.getLog(DefaultFlatFileItemReader.class);
|
||||
|
||||
public static final String READ_STATISTICS_NAME = "lines.read.count";
|
||||
|
||||
@@ -18,6 +18,8 @@ package org.springframework.batch.io.file;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.batch.io.exception.FlatFileParsingException;
|
||||
import org.springframework.batch.io.file.mapping.DefaultFieldSet;
|
||||
import org.springframework.batch.io.file.mapping.FieldSetMapper;
|
||||
@@ -55,6 +57,8 @@ import org.springframework.util.Assert;
|
||||
public class SimpleFlatFileItemReader extends AbstractItemReader implements ItemReader,
|
||||
InitializingBean, DisposableBean {
|
||||
|
||||
private static Log log = LogFactory.getLog(SimpleFlatFileItemReader.class);
|
||||
|
||||
// default encoding for input files - set to ISO-8859-1
|
||||
public static final String DEFAULT_CHARSET = "ISO-8859-1";
|
||||
|
||||
@@ -136,6 +140,8 @@ public class SimpleFlatFileItemReader extends AbstractItemReader implements Item
|
||||
Assert.state(resource.exists(), "Resource must exist: [" + resource
|
||||
+ "]");
|
||||
|
||||
log.debug("Opening flat file for reading: "+resource);
|
||||
|
||||
if (this.reader == null) {
|
||||
ResourceLineReader reader = new ResourceLineReader(resource, encoding);
|
||||
if (recordSeparatorPolicy != null) {
|
||||
@@ -172,6 +178,7 @@ public class SimpleFlatFileItemReader extends AbstractItemReader implements Item
|
||||
public void close() {
|
||||
try {
|
||||
if (reader != null) {
|
||||
log.debug("Closing flat file for reading: "+resource);
|
||||
reader.close();
|
||||
}
|
||||
} finally {
|
||||
|
||||
@@ -133,7 +133,6 @@ public class ResourceLineReader extends AbstractItemReader implements LineReader
|
||||
if (line != null) {
|
||||
while (line != null && !recordSeparatorPolicy.isEndOfRecord(record)) {
|
||||
record = recordSeparatorPolicy.preProcess(record) + (line = readLine());
|
||||
// record = new StringBuilder(recordSeparatorPolicy.preProcess(record)).append(line = readLine()).toString();
|
||||
}
|
||||
}
|
||||
return recordSeparatorPolicy.postProcess(record);
|
||||
|
||||
Reference in New Issue
Block a user