commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz (JIRA)" <>
Subject [jira] Updated: (POOL-106) Usage of System.currentTimeMillis() as key for a TreeMap
Date Mon, 19 Nov 2007 03:26:43 GMT


Phil Steitz updated POOL-106:

    Fix Version/s: 1.4

> Usage of System.currentTimeMillis() as key for a TreeMap
> --------------------------------------------------------
>                 Key: POOL-106
>                 URL:
>             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.

View raw message