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:19:12 UTC
[jira] [Resolved] (OAK-2027) SessionMBean fails to render due to
NPE in getSessionAttributes
[ https://issues.apache.org/jira/browse/OAK-2027?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chetan Mehrotra resolved OAK-2027.
----------------------------------
Resolution: Fixed
Fixed the logic to increment the counter
* trunk - http://svn.apache.org/r1617451
* 1.0 - http://svn.apache.org/r1617452
> 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)