commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: svn commit: r1301861 - /commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVRecord.java
Date Sat, 17 Mar 2012 11:41:43 GMT
On 17 March 2012 08:53, Emmanuel Bourg <ebourg@apache.org> wrote:
> IntelliJ IDEA complains about explicit boxing. Why do you change it?

Eclipse complains about implicit boxing.

But that's not why - I changed it because it makes the extra
processing explicit.

We're trying to make the code efficient, so using explicit conversions
means we can review whether the conversion is necessary or could be
avoided.

Leaving the explicit conversion in the code shows that we did intend
to do the conversion.

>
> Emmanuel Bourg
>
>
> Le 17/03/2012 05:12, sebb@apache.org a écrit :
>
>> Author: sebb
>> Date: Sat Mar 17 04:12:16 2012
>> New Revision: 1301861
>>
>> URL: http://svn.apache.org/viewvc?rev=1301861&view=rev
>> Log:
>> @Override; explicit unboxing
>>
>> Modified:
>>
>> commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVRecord.java
>>
>> Modified:
>> commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVRecord.java
>> URL:
>> http://svn.apache.org/viewvc/commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVRecord.java?rev=1301861&r1=1301860&r2=1301861&view=diff
>>
>> ==============================================================================
>> ---
>> commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVRecord.java
>> (original)
>> +++
>> commons/proper/csv/trunk/src/main/java/org/apache/commons/csv/CSVRecord.java
>> Sat Mar 17 04:12:16 2012
>> @@ -63,7 +63,7 @@ public class CSVRecord implements Serial
>>
>>          Integer index = mapping.get(name);
>>
>> -        return index != null ? values[index] : null;
>> +        return index != null ? values[index.intValue()] : null;
>>      }
>>
>>      public Iterator<String>  iterator() {
>> @@ -81,6 +81,7 @@ public class CSVRecord implements Serial
>>          return values.length;
>>      }
>>
>> +    @Override
>>      public String toString() {
>>          return Arrays.toString(values);
>>      }
>>
>>
>
>
> ---------------------------------------------------------------------
> 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