[
https://issues.apache.org/jira/browse/POOL-106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Phil Steitz resolved POOL-106.
------------------------------
Resolution: Duplicate
This issue is a duplicate of POOL-85, which was fixed in r468834.
> Usage of System.currentTimeMillis() as key for a TreeMap
> --------------------------------------------------------
>
> Key: POOL-106
> URL: https://issues.apache.org/jira/browse/POOL-106
> Project: Commons Pool
> Issue Type: Bug
> Affects Versions: 1.3
> Reporter: Hauke Rabe
> Fix For: 1.4
>
>
> In the method 'clearOldest' of GenericKeyedObjectPool the class
> ObjectTimestampPair is used as keys for a TreeMap wich compares the elements
> by System.currentTimeMillis().
> If two ObjectTimestampPair instances have the same timestamp the value in
> the map will be overridden and the wrong instance will be destroyed.
> If you use the pool with hibernate it will be result in a Statement already
> close Exception.
> As a patch i return never zero in the compareTo method of ObjectTimestampPair.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.