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:
parent
cb5de89971
commit
b3553addb7
|
@ -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()) {
|
||||
|
|
Loading…
Reference in New Issue