Do not track null ByteBuffers that are being released.

This commit is contained in:
Simone Bordet 2014-02-07 17:33:26 +01:00
parent ec8dabfa5b
commit 95c728c12f
1 changed files with 2 additions and 0 deletions

View File

@ -59,6 +59,8 @@ public class LeakTrackingByteBufferPool extends ContainerLifeCycle implements By
@Override
public void release(ByteBuffer buffer)
{
if (buffer == null)
return;
if (!leakDetector.released(buffer))
LOG.warn("ByteBuffer {}@{} released but not acquired", buffer, System.identityHashCode(buffer));
delegate.release(buffer);