The local variable record is hiding a field from type CSVParser.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1558888 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2014-01-16 19:05:43 +00:00
parent cb5de89971
commit b3553addb7
1 changed files with 3 additions and 3 deletions

View File

@ -330,9 +330,9 @@ public final class CSVParser implements Iterable<CSVRecord>, Closeable {
String[] header = null; String[] header = null;
if (formatHeader.length == 0) { if (formatHeader.length == 0) {
// read the header from the first line of the file // read the header from the first line of the file
final CSVRecord record = this.nextRecord(); final CSVRecord nextRecord = this.nextRecord();
if (record != null) { if (nextRecord != null) {
header = record.values(); header = nextRecord.values();
} }
} else { } else {
if (this.format.getSkipHeaderRecord()) { if (this.format.getSkipHeaderRecord()) {