Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-24648

Null Pointer Exception for getTopicById in MessageForumsForumManagerImpl.java

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.8.0
    • Fix Version/s: 2.8.1, 2.9.0
    • Component/s: Messages Tool
    • Labels:
      None
    • 2.9 Status:
      Resolved
    • Previous Issue Keys:
      MSGCNTR-551

      Description

      This part of the code needs to be cleaned up to avoid null pointers:

      Topic res = null;
      List temp = (ArrayList) getHibernateTemplate().execute(hcb);
      Object [] results = (Object[])temp.get(0);
      if (results != null) {
      if (results[0] instanceof Topic)

      { res = (Topic)results[0]; res.setBaseForum((BaseForum)results[1]); }

      else

      { res = (Topic)results[1]; res.setBaseForum((BaseForum)results[0]); }

      }

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                baholladay Bryan Holladay
                Reporter:
                baholladay Bryan Holladay
                Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration