commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: [CSV] change line number from 0-based to 1-based
Date Tue, 07 May 2013 04:22:50 GMT
I think there is also a record count that should be consistent with
1-based indexing if it is not already.

Gary

On May 6, 2013, at 18:19, sebb <sebbaz@gmail.com> wrote:

> I've just noticed that its Javadoc is inconsistent/ambiguous:
>
>    /**
>     * Returns the number of lines read
>     *
>     * @return the current-line-number (or -1)
>     */
>
> "Number of lines read" - I assume that is zero until the first
> complete line has been read, i.e. 0-based.
> "Current-line-number" - that seems more like a 1-based numbering scheme
> "(or -1)" - cannot occur.
>
> I'll fix that too.
>
> A rename might be in order (it's not part of the public API)
>
> On 6 May 2013 22:53, Gary Gregory <garydgregory@gmail.com> wrote:
>> On Mon, May 6, 2013 at 5:49 PM, sebb <sebbaz@gmail.com> wrote:
>>
>>> The line number returned by
>>>
>>> ExtendedBufferedReader.getLineNumber()
>>>
>>> currently starts at zero, so an error in the first line in the file is
>>> reported as being in line 0.
>>>
>>> There does not seem to be any good reason for using a zero-based line
>>> number, so I would like to change it to 1-based. Some tests will need
>>> to be fixed.
>>>
>>> WDYT?
>>
>> +1
>>
>> Gary
>>
>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>> --
>> E-Mail: garydgregory@gmail.com | ggregory@apache.org
>> Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
>> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
>> Spring Batch in Action <http://www.manning.com/templier/>
>> Blog: http://garygregory.wordpress.com
>> Home: http://garygregory.com/
>> Tweet! http://twitter.com/GaryGregory
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message