Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
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.)