netty/netty — pull request #2044 by danielnorberg (2013-12-06 17:48:40+00:00)
Title: writeIndex update fix + buffer bounds check fix + empty channel buffer test fix

* Make sure that `AbstractChannelBuffer#writeByte(int)` doesn't increment `writerIndex` if write was out of bounds.

* Add bounds checking to `AbstractChannelBuffer#bytesBefore`

* Make empty channel buffer run properly, fix failing tests and assert invariants after each test.