DemuxingProtocolCodecFactory doesn't reset the current MessageDecoder when
NOT_OK is returned.
----------------------------------------------------------------------------------------------
Key: DIRMINA-436
URL: https://issues.apache.org/jira/browse/DIRMINA-436
Project: MINA
Issue Type: Bug
Components: Filter
Affects Versions: 1.1.2, 1.0.5, 1.1.1, 1.0.4, 1.1.0, 1.0.3, 1.0.2, 1.0.1,
1.0.0
Reporter: Trustin Lee
Assignee: Trustin Lee
Fix For: 1.0.6, 1.1.3
On 9/8/07, Igor Grigoryev <[EMAIL PROTECTED]> wrote:
>
> I'm wondering why not set currentDecoder = null before throwing exceptions
> here (see below)
> ...
> if( result == MessageDecoder.OK )
> {
> currentDecoder = null;
> return true;
> }
> else if( result == MessageDecoder.NEED_DATA )
> {
> return false;
> }
> else if( result == MessageDecoder.NOT_OK )
> {
> //^^^^^^^^^^^^^^^^^^^^^^^^^^^
> //I mean here first of all
> throw new ProtocolDecoderException( "Message decoder
> returned NOT_OK." );
> }
> else
> {
> //^^^^^^^^^^^^^^^^^^^^^^^^^^^
> //And here possibly
> throw new IllegalStateException( "Unexpected decode result
> (see your decode()): " + result );
> }
>
> ....
>
> Without this it's not possible to recover codec state after unexpected
> message being received.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.