valotrading/stirling — pull request #51 by kro (2012-08-08 14:42:17+00:00)
Title: itch41: Fix reading ITCH sources bigger than 4096 bytes

ByteBuffer#limit throws an IllegalArgumentException if the new limit is
greater than the buffer's capacity, however, `decode` assumes that when
attempting to read more bytes than available, BufferUnderflowException
is thrown.

Now, set the limit to the capacity of the buffer, if the new limit is
greater, which in turn causes the expected exceptino to be thrown when
the buffer is read. Also, update the test case accordingly.

Signed-off-by: Karim Vuorisara