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

ObjectPool.invalidateObject(object) should throw an Exception if object is null

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0, 1.0.1, 1.1, 1.2, 1.3, 1.4, 1.5, 1.5.1, 1.5.2, 1.5.3, 1.5.4
    • Fix Version/s: 2.0
    • Labels:
      None

      Description

      ObjectPool.invalidateObject(object) should throw an Exception if object is null, otherwise the numActive count can get out of synch.

      It's easy to do this by mistake, see:

      http://markmail.org/thread/ya22ihmghejbfzme

      Also, the documentation for ObjectPool needs to be updated to clarify that invalidateObject should only be called if the object failed, not the borrow.
      [I'll do this shortly]

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: