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 2009/06/07 10:00:14 UTC

[jira] Closed: (DIRMINA-357) ConcurrentHashMap.put(key, null) throws an NPE effects BaseIOSession attachments/attributes

     [ https://issues.apache.org/jira/browse/DIRMINA-357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Lecharny closed DIRMINA-357.
-------------------------------------


> ConcurrentHashMap.put(key, null) throws an NPE effects BaseIOSession attachments/attributes
> -------------------------------------------------------------------------------------------
>
>                 Key: DIRMINA-357
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-357
>             Project: MINA
>          Issue Type: Bug
>          Components: Core, Example
>    Affects Versions: 1.1.0
>         Environment: linux, jdk 1.5
>            Reporter: keith mcneill
>            Assignee: Trustin Lee
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.