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

ConcurrentHashMap.put(key, null) throws an NPE effects BaseIOSession attachments/attributes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.0
    • None
    • Core, Example
    • None
    • linux, jdk 1.5

    Description

      the pattern to remove an attachment on an IOSession is to do a:

      setAttachment(null)

      In 1.1 this throws a NPE because the backing map of ConcurrentHashMap throws an exception when one tries to put a null.

      This is a problem for both attachments & attributes.

      Can fix by:

      • add a removeAttachement() call
      • special case nulls in setAttachement & setAttribute
      • change the backing map.

      This causes a problem in the proxy example where the client doesn't get responses back from the server.

      Attachments

        Activity

          People

            trustin Trustin Lee
            mcneill@streambase.com keith mcneill
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: