Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.5.6
-
None
-
java 1.6.0_24
Description
Hi,
When I call close() and borrowObject() concurrently with no objects in
the pool, close() will finish but borrowObject() is blocked forever.
The documentation of close() mentions that borrowObject() should fail
with IllegalStateException, so I would expect the waiting threads to
throw IllegalStateException.
I will attach a test that exposes this problem. For this test, the
expected output is:
0
1
2
...
4999
DONE
But when the bug manifests (almost always for this test), the output
is:
0
1
2
The test does not finish, it just gets stuck after printing several
values.
Is this a bug or am I reading the documentation wrongly? Is there
a patch for this?
Thanks!
Adrian