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] [Created] (OAK-2027) SessionMBean fails to render due to NPE in getSessionAttributes
Date Tue, 12 Aug 2014 11:03:12 GMT
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)

Mime
View raw message