Uploaded image for project: 'Commons Pool'
  1. Commons Pool
  2. POOL-216

GenericKeyedObjectPool.ensureMinIdle(K) does not need to check getMinIdlePerKey()

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Labels:
      None

      Description

      The private method GenericKeyedObjectPool.ensureMinIdle(K) checks getMinIdlePerKey().
      However, when called by ensureMinIdle(void), this check has already been done.

      The private method is only otherwise called by preparePool(K), so the check could be moved there.

      This would eliminate one extra check per key when executing the protected ensureMinIdle() method.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebb Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: