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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: