-----Mensagem original-----
De: David Jencks [mailto:[EMAIL PROTECTED]
> I've modified your equals method but kept hashcode. This uncovered
> several other problems in the tests which I have fixed.
>
> Please let me know if you find more problems.
Since you asked :-)
SinglePoolConnectionInterceptor.java:
In the returnConnection method:
Change
synchronized (pool) {
mci.setLastUsed(System.currentTimeMillis());
pool.addFirst(mci);
}
to
synchronized (pool) {
mci.setLastUsed(System.currentTimeMillis());
if (pool.isEmpty())
{
pool.addLast(mci);
}
else
{
pool.addFirst(mci);
}
}
When the pool is empty and you try to add the first connection it fails.
Strage that is not being catched in the test case.