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

subclass of CumulativeDecoder throws an UnsupportedOperationException if IoBuffer.slice() is used

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0-M1
    • 2.0.0-M2
    • Core
    • None

    Description

      If one extends the CumulativeDecoder and finds that there is not enough data in the buffer, one returns false on doDecode() so mina can collect more data. However, it seems that CumulativeDecoder puts the last remaining bytes from the decode into an UnderivableBuffer and stores it in the session. When it gets more data later, the data is added to this session buffer, and the CumulativeDecoder subclass gets to it.

      Calling methods like slice() and duplicate() on an UnderivableBuffer throw an exception. Therefore, your cumulative decoder that does slice() will result in an exception.

      See http://www.nabble.com/CumulativeDecoder-using-UnderivableBuffer-to15969933.html for more discussion.

      Attachments

        Activity

          People

            trustin Trustin Lee
            sjlee0 Sangjin Lee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: