You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Trustin Lee (JIRA)" <ji...@apache.org> on 2007/01/20 23:47:30 UTC

[jira] Updated: (DIRMINA-282) Prevent writing an empty buffer or null message

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

Trustin Lee updated DIRMINA-282:
--------------------------------

    Fix Version/s:     (was: 1.1)
                   2.0

> Prevent writing an empty buffer or null message
> -----------------------------------------------
>
>                 Key: DIRMINA-282
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-282
>             Project: MINA
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Trustin Lee
>            Priority: Trivial
>             Fix For: 2.0
>
>
> 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: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira