review comment: improve readability
Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
parent
593f4225f8
commit
b7b16a880b
|
@ -462,13 +462,16 @@ public class Pool<T> implements AutoCloseable, Dumpable
|
|||
for (Entry entry : copy)
|
||||
{
|
||||
boolean removed = entry.tryRemove();
|
||||
if (!removed)
|
||||
if (removed)
|
||||
{
|
||||
if (entry.pooled instanceof Closeable)
|
||||
IO.close((Closeable)entry.pooled);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (LOGGER.isDebugEnabled())
|
||||
LOGGER.debug("Pooled object still in use: {}", entry);
|
||||
}
|
||||
if (removed && entry.pooled instanceof Closeable)
|
||||
IO.close((Closeable)entry.pooled);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue