jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan Mehrotra (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (OAK-2027) SessionMBean fails to render due to NPE in getSessionAttributes
Date Tue, 12 Aug 2014 11:19:12 GMT

     [ 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)

Mime
View raw message