commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom van den Berge" <tom.vandenbe...@bibit.com>
Subject [Pool] Use of Exception in API
Date Mon, 20 Sep 2004 20:49:59 GMT
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


Mime
View raw message