[ 
https://issues.apache.org/jira/browse/DIRMINA-512?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Trustin Lee resolved DIRMINA-512.
---------------------------------

    Resolution: Fixed

Resolved.

> ProtocolDecoderException.getHexDump always returns 'empty'
> ----------------------------------------------------------
>
>                 Key: DIRMINA-512
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-512
>             Project: MINA
>          Issue Type: Bug
>          Components: Filter
>    Affects Versions: 1.0.8, 1.1.5
>            Reporter: Trustin Lee
>            Assignee: Trustin Lee
>            Priority: Minor
>             Fix For: 1.0.9, 1.1.6
>
>
> Hakan Guleryuz <[EMAIL PROTECTED]> reported this issue:
> Hi,
> I have extended DemuxingProtocolCodecFactory with multiple codecs attached,
> When I send a message that is not parsed by any of the codecs I receive the
> ProtocolDecoderException exception from my handler:
> public void exceptionCaught(IoSession session, Throwable cause) throws
> Exception
> in my IoHandlerAdapter
> but here ProtocolDecoderException.getHexDump is always empty.
> The cause is here at the doDecode method of DemuxingProtocolCodecFactory
> .CumulativeProtocolDecoder class
>                if (undecodables == decoders.length) {
>                    // Throw an exception if all decoders cannot decode
> data.
>                    String dump = in.getHexDump();
>                    in.position(in.limit()); // Skip data
>                    throw new ProtocolDecoderException(
>                            "No appropriate message decoder: " + dump);
>                }
> It should be changed to something like
>                if (undecodables == decoders.length) {
>                    // Throw an exception if all decoders cannot decode
> data.
>                    String dump = in.getHexDump();
>                    in.position(in.limit()); // Skip data
>                    ProtocolDecoderException e =  new
> ProtocolDecoderException(
>                            "No appropriate message decoder: " + dump);
>                    e.setHexDump(dump); <-------------- I believe, this is
> missed here
>                    throw e;
>                }
> I have checked the source of 1.1.5 and the issue was still there.
> Thank you for all the efforts in the Mina framework.
> Hakan.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to