Hi, since Emmanuel has hijacked the original thread for discussing legal issues, I'm bringing this up under a new topic ;-)
Please see my comments below. Benedikt ---------- Forwarded message ---------- From: Benedikt Ritter <brit...@apache.org> Date: 2013/8/1 Subject: Re: svn commit: r1509068 - in /commons/proper/csv/trunk/src: main/java/org/apache/commons/csv/ test/java/org/apache/commons/csv/ test/resources/ferc.gov/ To: Commons Developers List <dev@commons.apache.org> Hi Gary, 2013/8/1 <ggreg...@apache.org> Author: ggregory > Date: Thu Aug 1 02:03:33 2013 > New Revision: 1509068 > > URL: http://svn.apache.org/r1509068 > Log: > - Add some real world CSV files. > - Add a record API to get column values using an Enum. > - Throw a better exception when a resource is not found in a class loader > for the parser. > - Replace some tabs with spaces. > <snip> > > @@ -371,9 +400,9 @@ public class CSVParser implements Iterab > } > > public boolean hasNext() { > - if (CSVParser.this.isClosed()) { > - return false; > - } > + if (CSVParser.this.isClosed()) { > + return false; > + } > if (this.current == null) { > this.current = this.getNextRecord(); > } > @@ -382,9 +411,9 @@ public class CSVParser implements Iterab > } > > public CSVRecord next() { > - if (CSVParser.this.isClosed()) { > - return null; > - } > + if (CSVParser.this.isClosed()) { > + return null; > + } > CSVRecord next = this.current; > this.current = null; > > JavaDoc of the Iterator interface says that next() throws a NoSuchElementExecption if there are no more elements [1]. I'm not sure if this applies if the parser is closed. WDYT? Benedikt [1] http://docs.oracle.com/javase/6/docs/api/java/util/Iterator.html#next() -- http://people.apache.org/~britter/ http://www.systemoutprintln.de/ http://twitter.com/BenediktRitter http://github.com/britter -- http://people.apache.org/~britter/ http://www.systemoutprintln.de/ http://twitter.com/BenediktRitter http://github.com/britter