directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trustin Lee <>
Subject [mina] Do we need ProtocolViolationException.getBuffer()?
Date Wed, 21 Sep 2005 16:44:57 GMT

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?

what we call human nature is actually human habit

View raw message