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

ProtocolEncoderOutputImpl.flush() occur a IllegalArgumentException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.0.6, 2.0.7
    • 2.0.8
    • Core
    • None
    • 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

              Unassigned Unassigned
              zengjie zengjie
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: