commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <>
Subject Re: [pool] equal instances
Date Thu, 09 Jun 2011 06:19:17 GMT
On 9 June 2011 04:39, Phil Steitz <> wrote:
> Code in trunk now does not work when distinct pooled instances are
> equal - i.e., if a factory produces instances A and B and
> A.equals(B), this causes problems.   I think this situation should
> be allowed - i.e. it is an unacceptable restriction to put on object
> factories that distinct the poolable objects they produce be
> distinguishable under equals.  This would be a new requirement for
> [pool] and I don't think we should require it.  What do others think?

I agree one should not require instances to be unequal.

That means Pool has to be a bit careful about how it uses hashes -
presumably these objects will have the same hashCodes too.

> Phil
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message