Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 48033 invoked from network); 19 Nov 2007 03:27:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Nov 2007 03:27:05 -0000 Received: (qmail 96186 invoked by uid 500); 19 Nov 2007 03:26:51 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 96129 invoked by uid 500); 19 Nov 2007 03:26:50 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 96120 invoked by uid 99); 19 Nov 2007 03:26:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Nov 2007 19:26:50 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2007 03:26:49 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0FDFB714201 for ; Sun, 18 Nov 2007 19:26:43 -0800 (PST) Message-ID: <5965054.1195442803051.JavaMail.jira@brutus> Date: Sun, 18 Nov 2007 19:26:43 -0800 (PST) From: "Phil Steitz (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (POOL-106) Usage of System.currentTimeMillis() as key for a TreeMap In-Reply-To: <32038569.1192516191133.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/POOL-106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Phil Steitz updated POOL-106: ----------------------------- Fix Version/s: 1.4 > 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.