You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "William R. Speirs (JIRA)" <ji...@apache.org> on 2013/05/13 21:59:16 UTC

[jira] [Commented] (DBUTILS-109) AbstractExecutor.currentPosition should be an int

    [ https://issues.apache.org/jira/browse/DBUTILS-109?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13656294#comment-13656294 ] 

William R. Speirs commented on DBUTILS-109:
-------------------------------------------

Sebb I think you fixed this in http://svn.apache.org/r1481212 right?
                
> AbstractExecutor.currentPosition should be an int
> -------------------------------------------------
>
>                 Key: DBUTILS-109
>                 URL: https://issues.apache.org/jira/browse/DBUTILS-109
>             Project: Commons DbUtils
>          Issue Type: Bug
>            Reporter: Sebb
>
> AbstractExecutor.currentPosition is currently an Integer.
> It is only used here:
> posList.add(++currentPosition);
> This involves converting the Integer to an int, incrementing the int and then converting back to an Integer.
> It would be rather more efficient to create the field as an int.
> Alternatively, if the class is supposed to be thread-safe, maybe an AtomicInteger would be better.
> Integer is not the best choice here.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira