Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-2027

SessionMBean fails to render due to NPE in getSessionAttributes

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.0.5, 1.1.0
    • core
    • None

    Description

      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

          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;
          }
      

      Attachments

        Activity

          People

            chetanm Chetan Mehrotra
            chetanm Chetan Mehrotra
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: