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.
Thanks for pointing out the bug. It's resolved now, and the fix will
be included in the next release.
https://issues.apache.org/jira/browse/DIRMINA-436
HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6