Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 24064 invoked from network); 20 Sep 2004 20:50:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 20 Sep 2004 20:50:19 -0000 Received: (qmail 39920 invoked by uid 500); 20 Sep 2004 20:50:07 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 39755 invoked by uid 500); 20 Sep 2004 20:50:05 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 39728 invoked by uid 99); 20 Sep 2004 20:50:05 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [212.136.106.3] (HELO sr97.bibit.com) (212.136.106.3) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 20 Sep 2004 13:50:04 -0700 Received: from localhost (localhost [127.0.0.1]) by sr97.bibit.com (Postfix) with ESMTP id A667B48F7 for ; Mon, 20 Sep 2004 22:50:02 +0200 (CEST) Received: from sr97.bibit.com ([127.0.0.1]) by localhost (sr097 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00209-08 for ; Mon, 20 Sep 2004 22:50:00 +0200 (CEST) Received: from postduif.bibit.com (postduif.bibit.com [10.100.1.12]) by sr97.bibit.com (Postfix) with ESMTP id E72054908 for ; Mon, 20 Sep 2004 22:49:59 +0200 (CEST) Received: from localhost (localhost.localdomain [127.0.0.1]) by postduif.bibit.com (Postfix) with ESMTP id CF088805D for ; Mon, 20 Sep 2004 22:49:59 +0200 (CEST) Received: from postduif.bibit.com ([127.0.0.1]) by localhost (postduif [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 11314-09 for ; Mon, 20 Sep 2004 22:49:59 +0200 (CEST) Received: from mail.bibit.com (sr097.bibit.com [212.136.106.3]) by postduif.bibit.com (Postfix) with SMTP id 4DFBD8057 for ; Mon, 20 Sep 2004 22:49:59 +0200 (CEST) Received: from 62.251.120.66 (SquirrelMail authenticated user tom) by webmail.bibit.com with HTTP; Mon, 20 Sep 2004 22:49:59 +0200 (CEST) Message-ID: <32935.62.251.120.66.1095713399.squirrel@webmail.bibit.com> Date: Mon, 20 Sep 2004 22:49:59 +0200 (CEST) Subject: [Pool] Use of Exception in API From: "Tom van den Berge" To: commons-user@jakarta.apache.org Reply-To: tom.vandenberge@bibit.com User-Agent: SquirrelMail/1.4.2 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 Importance: Normal X-Virus-Scanned: by amavisd-new at bibit.com X-Virus-Scanned: by amavisd-new at bibit.com X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, Hi recently started using the pool API, and I think it's a very useful API. However I noticed the frequent "throws Exception" declarations, which is generally bad practice. Many of the core methods in the interfaces declare it, so automatically all implementations are using it, too. One example is the borrowObject method from ObjectPool. The implementing class GenericObjectPool calls a couple of methods from PoolableObjectFactory, which also throw Exception, and the method itself also throws an Exception. Are there any plans scheduled for refactoring these issues throughout the API? Since the code is fairly small in size and compact, it shouldn't be too much effort, and the code will improve greatly. Backward compatibility is not an issue since you would typically replace the Exceptions with more specific exceptions. Regards, Tom --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org