Author: sebb Date: Thu Mar 22 22:16:01 2012 New Revision: 1304097 URL: http://svn.apache.org/viewvc?rev=1304097&view=rev Log: Rename to avoid hiding class field
Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java Modified: commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java URL: http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java?rev=1304097&r1=1304096&r2=1304097&view=diff ============================================================================== --- commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java (original) +++ commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVParser.java Thu Mar 22 22:16:01 2012 @@ -119,16 +119,15 @@ public class CSVParser implements Iterab */ public List<CSVRecord> getRecords() throws IOException { List<CSVRecord> records = new ArrayList<CSVRecord>(); - CSVRecord record; - while ((record = getRecord()) != null) { - records.add(record); + CSVRecord rec; + while ((rec = getRecord()) != null) { + records.add(rec); } if (!records.isEmpty()) { return records; - } else { - return null; } + return null; } /** @@ -179,9 +178,9 @@ public class CSVParser implements Iterab String[] header = null; if (format.getHeader().length == 0) { // read the header from the first line of the file - CSVRecord record = getRecord(); - if (record != null) { - header = record.values(); + CSVRecord rec = getRecord(); + if (rec != null) { + header = rec.values(); } } else { header = format.getHeader();