You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2014/09/04 16:52:51 UTC
[jira] [Updated] (DIRMINA-970) ProtocolEncoderOutputImpl.flush()
occur a IllegalArgumentException
[ https://issues.apache.org/jira/browse/DIRMINA-970?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny updated DIRMINA-970:
--------------------------------------
Fix Version/s: (was: 2.0.6)
> ProtocolEncoderOutputImpl.flush() occur a IllegalArgumentException
> ------------------------------------------------------------------
>
> Key: DIRMINA-970
> URL: https://issues.apache.org/jira/browse/DIRMINA-970
> Project: MINA
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.6, 2.0.7
> Environment: anywhere
> Reporter: zengjie
> Priority: Critical
> Fix For: 2.0.8
>
>
> public WriteFuture flush() {
> Queue<Object> bufferQueue = getMessageQueue();
> WriteFuture future = null;
> while (!bufferQueue.isEmpty()) {
> Object encodedMessage = bufferQueue.poll();
> if (encodedMessage == null) {
> break;
> }
> // Flush only when the buffer has remaining.
> if (!(encodedMessage instanceof IoBuffer) || ((IoBuffer) encodedMessage).hasRemaining()) {
> future = new DefaultWriteFuture(session);
> nextFilter.filterWrite(session, new EncodedWriteRequest(encodedMessage, future, destination));
> }
> }
> if (future == null) {
> // Creates an empty writeRequest containing the destination
> WriteRequest writeRequest = new DefaultWriteRequest(null, null, destination);
> future = DefaultWriteFuture.newNotWrittenFuture(session, new NothingWrittenException(writeRequest));
> }
> return future;
> }
> if there are nothing in message queue ,this method try to return a future to represent a NotWritten operation with DefaultWriteRequest, but a IllegalArgumentException was throw while constructing a DefaultWriteRequest with a null message
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)