Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 31909 invoked from network); 8 Dec 2007 23:32:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Dec 2007 23:32:04 -0000 Received: (qmail 61987 invoked by uid 500); 8 Dec 2007 23:31:52 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 61902 invoked by uid 500); 8 Dec 2007 23:31:52 -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 61891 invoked by uid 99); 8 Dec 2007 23:31:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 08 Dec 2007 15:31:52 -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; Sat, 08 Dec 2007 23:31:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0B0EE71422B for ; Sat, 8 Dec 2007 15:31:43 -0800 (PST) Message-ID: <15419719.1197156703012.JavaMail.jira@brutus> Date: Sat, 8 Dec 2007 15:31:43 -0800 (PST) From: "Phil Steitz (JIRA)" To: issues@commons.apache.org Subject: [jira] Resolved: (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 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.