commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject Re: svn commit: r1559905 - in /commons/proper/csv/trunk/src: main/java/org/apache/commons/csv/CSVRecord.java test/java/org/apache/commons/csv/CSVRecordTest.java
Date Tue, 21 Jan 2014 12:57:02 GMT
On Tue, Jan 21, 2014 at 6:54 AM, Adrian Crum <
adrian.crum@sandglass-software.com> wrote:

> Btw, line #179 - potential NPE.
>
> If CSVRecord is intended to be read-only, then the toMap() method should
> return an unmodifiable Map.


My use case is read-only but it does not seem needed to restrict the
general use case. If record implements Map, then the record becomes read
write if we want to.

Gary


>
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com
>
> On 1/21/2014 6:44 AM, Adrian Crum wrote:
>
>> I must be confused. If the goal was to give CSVRecord a Map interface,
>> then that would include the interface's put method.
>>
>> If we don't support the Map interface, then what is the point of this
>> change?
>>
>> Adrian Crum
>> Sandglass Software
>> www.sandglass-software.com
>>
>> On 1/21/2014 6:36 AM, Emmanuel Bourg wrote:
>>
>>> Le 21/01/2014 12:20, Adrian Crum a écrit :
>>>
>>>> This looks really ugly. How do I update the CSVRecord using Map.put()?
>>>>
>>>
>>> Shouldn't the record be read only? As the result of a parsing it's not
>>> intended to be modified.
>>>
>>> Emmanuel Bourg
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>>
>>
> ---------------------------------------------------------------------
> 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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message