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

PooledObject.getActiveTimeMillis() does not synch. access to lastReturnTime and lastBorrowTime

    XMLWordPrintableJSON

Details

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

    Description

      The method PooledObject.getActiveTimeMillis() compares lastReturnTime and lastBorrowTime, but is not synchronised; nor are the variables volatile.

      There are two possible thread issues here: safe publication of the variables, and possible window error when comparing the values.

      The method needs to be synch. and the fields need to be volatile (or the getters need to be synch.)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: