You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2002/12/13 00:53:18 UTC
DO NOT REPLY [Bug 15339] -
StackObjectPool needs to ensure available objects in pool are unique
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15339>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15339
StackObjectPool needs to ensure available objects in pool are unique
rwaldhoff@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|Normal |Enhancement
------- Additional Comments From rwaldhoff@apache.org 2002-12-12 23:53 -------
This patch assumes that the pooled objects define a meaningful equals method,
which may not always be the case (although it's probably generally the case).
This is probably more accurately considered a documentation lack. The implict
contract is that each object is only returned once. As you suggest, it is
possible to confirm/enforce this contract by checking the objects already in
the pool, at some cost (perhaps small). I'm not sure we always need/want to
validate this assertion, or whether we want to make this validation
configurable (e.g., we could make it an actual JDK 1.4 assertion, or
have "strict" mode that checks it, etc.).
Also, the same defect could be reported against all of the current pool
implementations.
I'm gonna flag this as an enhancement for now. We should probably at least
clarify the contract w.r.t. this because you're right, returning the same
object multiple times will likely lead to problems in the client code.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>