Rename ivar headerMapping -> headerMap.
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1383920 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7c86611ee4
commit
473727be26
|
@ -69,7 +69,7 @@ import static org.apache.commons.csv.Token.Type.*;
|
||||||
public class CSVParser implements Iterable<CSVRecord> {
|
public class CSVParser implements Iterable<CSVRecord> {
|
||||||
|
|
||||||
private final Lexer lexer;
|
private final Lexer lexer;
|
||||||
private final Map<String, Integer> headerMapping;
|
private final Map<String, Integer> headerMap;
|
||||||
|
|
||||||
// the following objects are shared to reduce garbage
|
// the following objects are shared to reduce garbage
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ public class CSVParser implements Iterable<CSVRecord> {
|
||||||
|
|
||||||
this.lexer = new CSVLexer(format, new ExtendedBufferedReader(input));
|
this.lexer = new CSVLexer(format, new ExtendedBufferedReader(input));
|
||||||
|
|
||||||
this.headerMapping = initializeHeader(format);
|
this.headerMap = initializeHeader(format);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -148,7 +148,7 @@ public class CSVParser implements Iterable<CSVRecord> {
|
||||||
* on parse error or input read-failure
|
* on parse error or input read-failure
|
||||||
*/
|
*/
|
||||||
CSVRecord getRecord() throws IOException {
|
CSVRecord getRecord() throws IOException {
|
||||||
CSVRecord result = new CSVRecord(null, headerMapping, null);
|
CSVRecord result = new CSVRecord(null, headerMap, null);
|
||||||
record.clear();
|
record.clear();
|
||||||
StringBuilder sb = null;
|
StringBuilder sb = null;
|
||||||
do {
|
do {
|
||||||
|
@ -184,7 +184,7 @@ public class CSVParser implements Iterable<CSVRecord> {
|
||||||
|
|
||||||
if (!record.isEmpty()) {
|
if (!record.isEmpty()) {
|
||||||
final String comment = sb == null ? null : sb.toString();
|
final String comment = sb == null ? null : sb.toString();
|
||||||
result = new CSVRecord(record.toArray(new String[record.size()]), headerMapping, comment);
|
result = new CSVRecord(record.toArray(new String[record.size()]), headerMap, comment);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue