Prevent writing an empty buffer or null message
-----------------------------------------------
Key: DIRMINA-282
URL: http://issues.apache.org/jira/browse/DIRMINA-282
Project: Directory MINA
Issue Type: Improvement
Components: Core
Reporter: Trustin Lee
Priority: Trivial
Fix For: 1.1
People often forget to call ByteBuffer.flip() which results in writing an empty
buffer. We could throw an IllegalArgumentException in this case.
NullPointerException also could be thrown when a user writes a null message.
Adding small check code in ProtocolEncoderOutput.write() (empty?),
ProtocolDecoderOutput.write() (null?) and IoSession.write() (null or empty?)
would be enough.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira