You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Nils-Helge Garli (JIRA)" <ji...@apache.org> on 2008/12/15 06:50:37 UTC
[jira] Resolved: (WW-2751) SessionMap containsKey will not find an
object put into the map
[ https://issues.apache.org/struts/browse/WW-2751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nils-Helge Garli resolved WW-2751.
----------------------------------
Resolution: Fixed
> SessionMap containsKey will not find an object put into the map
> ---------------------------------------------------------------
>
> Key: WW-2751
> URL: https://issues.apache.org/struts/browse/WW-2751
> Project: Struts 2
> Issue Type: Bug
> Components: Core Actions, Core Interceptors
> Affects Versions: 2.1.1, 2.1.2
> Reporter: Ian Robinson
> Assignee: Nils-Helge Garli
> Priority: Minor
> Fix For: 2.1.3
>
> Attachments: SessionMap.patch, SessionMapTest.patch
>
>
> The put, get and remove methods on SessionMap do a toString() on the key they are dealing with.
> containsKey is not overridden and so uses the method inherited from AbstractMap.
> AbstractMap.containsKey(Object value) compares the object with the key entries using value.equals(e.getValue())
> Therfore, if you put an object into the map, for instance an enum, containsKey(enum) wont find it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.