[
https://issues.jboss.org/browse/GTNPC-103?page=com.atlassian.jira.plugin....
]
RH Bugzilla Integration commented on GTNPC-103:
-----------------------------------------------
Martin Weiler <mweiler(a)redhat.com> made a comment on [bug
920547|https://bugzilla.redhat.com/show_bug.cgi?id=920547]
Description of problem:
Calling PortletSession.getAttributeMap(PortletSession.APPLICATION_SCOPE) returns a Map
with all application scoped keys, but with NULL values for each key.
How reproducible:
always
Steps to Reproduce:
1. In a portlet, call request.getPortletSession().getAttributeMap(
PortletSession.APPLICATION_SCOPE)
Actual results:
The Map contains the keys of the application scoped session attributes, but each key has a
NULL value.
Expected results:
Each key has the assigned value.
Additional info:
https://issues.jboss.org/browse/GTNPC-103
PortletSession.getAttributeMap(APPLICATION_SCOPE) is returning null
valued map
------------------------------------------------------------------------------
Key: GTNPC-103
URL:
https://issues.jboss.org/browse/GTNPC-103
Project: GateIn Portlet Container
Issue Type: Bug
Components: API
Affects Versions: 2.4.0.Final
Reporter: Martin Weiler
Calling PortletSession.getAttributeMap(PortletSession.APPLICATION_SCOPE) returns a Map
with all application scoped keys, but with NULL values for each key.
The reason for this is that the scope parameter is not used to look up the attribute
values:
{code:java}
public Map<String, Object> getAttributeMap(int i)
{
Enumeration attributes = getAttributeNames(i);
Map<String, Object> attrs = new HashMap<String, Object>();
while (attributes.hasMoreElements())
{
String name = (String)attributes.nextElement();
attrs.put(name, getAttribute(name)); // <== missing scope
attribute, should be: getAttribute(name, i)
}
return Collections.unmodifiableMap(attrs);
}
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira