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;
if (formatHeader.length == 0) {
// read the header from the first line of the file
final CSVRecord record = this.nextRecord();
if (record != null) {
header = record.values();
final CSVRecord nextRecord = this.nextRecord();
if (nextRecord != null) {
header = nextRecord.values();
}
} else {
if (this.format.getSkipHeaderRecord()) {