Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 28364 invoked from network); 16 Sep 2009 12:47:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Sep 2009 12:47:23 -0000 Received: (qmail 92793 invoked by uid 500); 16 Sep 2009 12:47:22 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 92616 invoked by uid 500); 16 Sep 2009 12:47:22 -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 92555 invoked by uid 99); 16 Sep 2009 12:47:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Sep 2009 12:47:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Sep 2009 12:47:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D303B234C1E9 for ; Wed, 16 Sep 2009 05:46:57 -0700 (PDT) Message-ID: <1418070280.1253105217856.JavaMail.jira@brutus> Date: Wed, 16 Sep 2009 05:46:57 -0700 (PDT) From: "VIJAY KUMAR (JIRA)" To: issues@commons.apache.org Subject: [jira] Created: (POOL-150) GenericKeyedObjectPool.preparePool does not throw an exception if supplied factory is null MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org GenericKeyedObjectPool.preparePool does not throw an exception if supplied factory is null ------------------------------------------------------------------------------------------ Key: POOL-150 URL: https://issues.apache.org/jira/browse/POOL-150 Project: Commons Pool Issue Type: Bug Affects Versions: 1.4 Environment: Java 5 Reporter: VIJAY KUMAR GenericKeyedObjectPool.preparePool doesnot throw an exception if supplied factory is null. GenericKeyedObjectPool.preparePool invokes ensureMinIdle() if populateImmediately is true and GenericKeyedObjectPool.ensureMinIdle() invokes GenericKeyedObjectPool.addObject() which throws an IllegalStateException if factory is null but this exception does not throw further in GenericKeyedObjectPool.preparePool. Catch block of GenericKeyedObjectPool..preparePool is empty. public synchronized void preparePool(Object key, boolean populateImmediately) { ObjectQueue pool = (ObjectQueue)(_poolMap.get(key)); System.out.println(this.getClass().getName()+".preparePool() pool ["+pool +"]"); if (null == pool) { pool = new ObjectQueue(); _poolMap.put(key,pool); _poolList.add(key); } if (populateImmediately) { try { // Create the pooled objects System.out.println(this.getClass().getName()+".preparePool() Create the pooled objects "); ensureMinIdle(key); } catch (Exception e) { //Do nothing } } } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.