netty/netty — pull request #553 by jfallows (2012-08-24 05:16:04+00:00)
Title: Ensure unmodified buffer delivered via pipeline after AIO read completes

Calling `ensureWritableBytes()` in the read completion handler before delivering the data to the pipeline causes the buffer to reallocate, copy and grow by 4K prematurely, since processing the data likely makes more space available for the next read without needing to reallocate capacity.