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

Trustin Lee closed DIRMINA-282.
-------------------------------

    Resolution: Fixed
      Assignee: Trustin Lee

Fixed and checked in.  NullPointerException and IllegalArgumentException will 
be thrown.

> 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
>         Assigned To: Trustin Lee
>            Priority: Trivial
>             Fix For: 2.0.0-M1
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.

Reply via email to