Trustin,
Yes, it works.
Thanks for the fast fix.
Hakan.
Trustin Lee wrote:
>
> Hi Hakan,
>
> I've just checked in the fix. Please let me know if it works or not.
>
> Thanks,
> Trustin
>
> On Jan 10, 2008 8:45 PM, Hakan Guleryuz <[EMAIL PROTECTED]> wrote:
>>
>> 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.
>> --
>> View this message in context:
>> http://www.nabble.com/ProtocolDecoderException.getHexDump-always-returns-%27empty%27-tp14731177s16868p14731177.html
>> Sent from the Apache MINA Support Forum mailing list archive at
>> Nabble.com.
>>
>>
>
>
>
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP Key ID: 0x0255ECA6
>
>
--
View this message in context:
http://www.nabble.com/ProtocolDecoderException.getHexDump-always-returns-%27empty%27-tp14731177s16868p14839838.html
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.