I find some code to refactor using analysis :
* Redundant Collection.addAll() call. It may cause one time array copy.
* The code like this.messageBytesToRead >= input.readableByteCount() ? input.readableByteCount() : this.messageBytesToRead; may cause one more time input.readableByteCount() call.
Comment From: zhangt2333
@sbrannen Aha, Thanks for your code review !
Comment From: sbrannen
Thanks for making the requested changes. I plan to merge this after 5.2.4 has been released.
Comment From: sbrannen
This has been merged into master.
Thanks