You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Trustin Lee (JIRA)" <ji...@apache.org> on 2007/09/13 11:25:32 UTC
[jira] Resolved: (DIRMINA-436) DemuxingProtocolCodecFactory doesn't
reset the current MessageDecoder when NOT_OK is returned.
[ https://issues.apache.org/jira/browse/DIRMINA-436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Trustin Lee resolved DIRMINA-436.
---------------------------------
Resolution: Fixed
'currentDecoder = null;' has been added as you suggested. Thank you!
> 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.0.0, 1.0.1, 1.0.2, 1.0.3, 1.1.0, 1.0.4, 1.1.1, 1.0.5, 1.1.2
> Reporter: Trustin Lee
> Assignee: Trustin Lee
> Fix For: 1.0.6, 1.1.3
>
>
> On 9/8/07, Igor Grigoryev <gr...@gmail.com> 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.