Actually another person talked to me about this issue and fixed it.  I
simply removed the return statement instead of replacing it with the
continue statement, which is actually same modification.

Thanks for the patch anyway!

Frederick Haebin Na wrote:
> Hi, Trusting and awesome Mina Team,
> 
> How are you guys?
> Well, today, when I was trying to test for the async calls, I (presumably)
> found a bug when handling a continous data packet in
> DecodingStateProtocolDecoder. (Against, Mina-2.0.0-M1,
> DecodingStateProtocolDecoder.java:73)
> 
>     for (;;) {
>             IoBuffer b = undecodedBuffers.peek();
>             if (b == null) {
>                 break;
>             }
> 
>             int oldRemaining = b.remaining();
>             state.decode(b, out);
>             int newRemaining = b.remaining();
>             if (newRemaining != 0) {
>                 if (oldRemaining == newRemaining) {
>                     throw new IllegalStateException(
>                             DecodingState.class.getSimpleName() + " must " +
>                             "consume at least one byte per decode().");
>                 }
>                 continue; // ### should be continue; instead of return;
>             } else {
>                 undecodedBuffers.poll();
>             }
>         }
> 
> So, please review my patch.
> 
> Thanks, and keep up the great work!
> 

-- 
Trustin Lee - Principal Software Engineer, JBoss, Red Hat
--
what we call human nature is actually human habit
--
http://gleamynode.net/

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to