You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Chetan Mehrotra (JIRA)" <ji...@apache.org> on 2014/08/12 13:03:12 UTC
[jira] [Created] (OAK-2027) SessionMBean fails to render due to NPE
in getSessionAttributes
Chetan Mehrotra created OAK-2027:
------------------------------------
Summary: SessionMBean fails to render due to NPE in getSessionAttributes
Key: OAK-2027
URL: https://issues.apache.org/jira/browse/OAK-2027
Project: Jackrabbit Oak
Issue Type: Bug
Components: core
Reporter: Chetan Mehrotra
Assignee: Chetan Mehrotra
Priority: Minor
Fix For: 1.1, 1.0.5
SessionStats getAttribute is implemented as below. The variable {{k}} is not increment which leads to null being set in array value which causes issue later
{code:java}
public String[] getSessionAttributes() {
String[] atts = new String[attributes.size()];
int k = 0;
for (Entry<String, Object> attribute : attributes.entrySet()) {
atts[k] = attribute.getKey() + '=' + attribute.getValue();
}
return atts;
}
{code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)