You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Trustin Lee (JIRA)" <ji...@apache.org> on 2007/03/20 02:39:32 UTC
[jira] Resolved: (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 ]
Trustin Lee resolved DIRMINA-357.
---------------------------------
Resolution: Fixed
Assignee: Trustin Lee
Now it doesn't throw a NPE. Please try the latest snapshot.
> 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
> Assigned To: 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.