diff --git a/src/main/java/org/jboss/netty/channel/socket/nio/ReadBufferPool.java b/src/main/java/org/jboss/netty/channel/socket/nio/ReadBufferPool.java index ad5bb579e8..14979024aa 100644 --- a/src/main/java/org/jboss/netty/channel/socket/nio/ReadBufferPool.java +++ b/src/main/java/org/jboss/netty/channel/socket/nio/ReadBufferPool.java @@ -44,6 +44,7 @@ final class ReadBufferPool { } final ByteBuffer acquire(int size) { + final SoftReference[] pool = this.pool; for (int i = 0; i < POOL_SIZE; i ++) { SoftReference ref = pool[i]; if (ref == null) { @@ -73,6 +74,7 @@ final class ReadBufferPool { } final void release(ByteBuffer buffer) { + final SoftReference[] pool = this.pool; for (int i = 0; i < POOL_SIZE; i ++) { SoftReference ref = pool[i]; if (ref == null || ref.get() == null) {