Uploaded image for project: 'Commons DbUtils'
  1. Commons DbUtils
  2. DBUTILS-109

AbstractExecutor.currentPosition should be an int

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: