directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Fran├žois Daune <>
Subject Re: [mina] Do we need ProtocolViolationException.getBuffer()?
Date Wed, 21 Sep 2005 17:42:34 GMT
Trustin Lee wrote:

> Hi,
> There is a method 'getBuffer()' in ProtocolViolationException which 
> returns the read buffer caused the exception.  Users can inspect the 
> buffer to find out what problem was.  
> ProtocolViolationException.getMessage () appends the hexadecimal dump 
> to the original message provided by user and returns the appended message.
> The problem here is that we don't know when to release the buffer.  We 
> can simply release the buffer just after exceptionCaught() event 
> handler is invoked for ProtocolViolationException.  Or we can remove 
> getBuffer() method if is doesn't have any useful reason to survive.
> What do you think?  Do you see any good reason to retain getBuffer() 
> method?
> Trustin
> -- 
> what we call human nature is actually human habit
> --
> <>

I think it is useful to have a dump of message causing exceptions. But 
the buffer itself, I don't know.

Maybe just storing a dump in the ProtocolViolationException is enough.


View raw message