|
69 | 69 | public class CSVParser implements Iterable<CSVRecord> { |
70 | 70 |
|
71 | 71 | private final Lexer lexer; |
72 | | - private final Map<String, Integer> headerMapping; |
| 72 | + private final Map<String, Integer> headerMap; |
73 | 73 |
|
74 | 74 | // the following objects are shared to reduce garbage |
75 | 75 |
|
@@ -104,7 +104,7 @@ public CSVParser(Reader input, CSVFormat format) throws IOException { |
104 | 104 |
|
105 | 105 | this.lexer = new CSVLexer(format, new ExtendedBufferedReader(input)); |
106 | 106 |
|
107 | | - this.headerMapping = initializeHeader(format); |
| 107 | + this.headerMap = initializeHeader(format); |
108 | 108 | } |
109 | 109 |
|
110 | 110 | /** |
@@ -148,7 +148,7 @@ public List<CSVRecord> getRecords() throws IOException { |
148 | 148 | * on parse error or input read-failure |
149 | 149 | */ |
150 | 150 | CSVRecord getRecord() throws IOException { |
151 | | - CSVRecord result = new CSVRecord(null, headerMapping, null); |
| 151 | + CSVRecord result = new CSVRecord(null, headerMap, null); |
152 | 152 | record.clear(); |
153 | 153 | StringBuilder sb = null; |
154 | 154 | do { |
@@ -184,7 +184,7 @@ CSVRecord getRecord() throws IOException { |
184 | 184 |
|
185 | 185 | if (!record.isEmpty()) { |
186 | 186 | final String comment = sb == null ? null : sb.toString(); |
187 | | - result = new CSVRecord(record.toArray(new String[record.size()]), headerMapping, comment); |
| 187 | + result = new CSVRecord(record.toArray(new String[record.size()]), headerMap, comment); |
188 | 188 | } |
189 | 189 | return result; |
190 | 190 | } |
|
0 commit comments