Uploaded image for project: 'MINA'
  1. MINA
  2. DIRMINA-970

ProtocolEncoderOutputImpl.flush() occur a IllegalArgumentException

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0.6, 2.0.7
    • Fix Version/s: 2.0.8
    • Component/s: Core
    • Labels:
      None
    • Environment:
      anywhere

      Description

      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

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              zengjie zengjie

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment