2015-02-07 1:34 GMT+01:00 Konstantin Kolinko <[email protected]>:
> The new code does not reset lastValid and pos in case when pos ==
> lastValid and both are > 0.
>
> It shall be
>
> if (lastValid - pos > 0 && pos > 0) {
> System.arraycopy(buf, pos, buf, 0, lastValid - pos);
> }
> lastValid = lastValid - pos;
> pos = 0;
>
I agree it should be that, it looks less risky if the recycling does always
reset a clean state.
Rémy
