You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2019/12/25 21:51:27 UTC

[GitHub] [commons-csv] garydgregory commented on a change in pull request #52: Add CSVRecord.isSet(int) method

garydgregory commented on a change in pull request #52: Add CSVRecord.isSet(int) method
URL: https://github.com/apache/commons-csv/pull/52#discussion_r361339000
 
 

 ##########
 File path: src/main/java/org/apache/commons/csv/CSVRecord.java
 ##########
 @@ -211,7 +211,18 @@ public boolean isMapped(final String name) {
      * @return whether a given columns is mapped and has a value
      */
     public boolean isSet(final String name) {
-        return isMapped(name) && getHeaderMapRaw().get(name).intValue() < values.length;
+        return isMapped(name) && getHeaderMapRaw().get(name) < values.length;
 
 Review comment:
   Let's keep the boxing as is please and focus this PR on the new API. 
   
   If you want to go through the whole code base and consistently use one boxing style that's a different PR IMO. But: I prefer to know when boxing and unboxing takes place since it is not free; this gives the compiler the opportunity to flag unintentional boxing and unboxing and let the programmer decide that's really what should happen.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services