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

Null pointer exception in DiscussionForumTool.java, getNeedToPostFirst

    XMLWordPrintable

    Details

    • 2.9 Status:
      Resolved
    • Previous Issue Keys:
      SAK-24419, MSGCNTR-833

      Description

      public boolean getNeedToPostFirst() gets called without a selectedTopic resulting in crasch:

      caused by: java.lang.NullPointerException
      at org.sakaiproject.tool.messageforums.DiscussionForumTool.getNeedToPostFirst(DiscussionForumTool.java:2392)

      Temporary workaround is to check if selectedTopic is null
      if (selectedTopic == null)

      { LOG.error("No topic is selected in getNeedToPostFirst"); return true; }

      return getNeedToPostFirst(currentUser, selectedTopic.getTopic(), selectedTopic.getMessages()).contains(currentUserId);

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                wagnermr Michelle Wagner
                Reporter:
                arwhyte Anthony Whyte
                Votes:
                1 Vote for this issue
                Watchers:
                7 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration