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

NPE protection for assessment beginTime Date object

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.3
    • Fix Version/s: 12.0, 19.0
    • Labels:
      None
    • 12 status:
      Resolved
    • 11 status:
      Please Merge
    • Previous Issue Keys:
      SAM-3341
    • Test Plan:
      Hide

      Please add a Test Plan here.

      Show
      Please add a Test Plan here.

      Description

      Historically, although not often, we've seen some NPEs float through our production logs with the following common stack trace:

      caused by: java.lang.NullPointerException
          at org.sakaiproject.tool.assessment.ui.bean.delivery.DeliveryBean.getTimeBeforeRetract(DeliveryBean.java:3719)
          at org.sakaiproject.tool.assessment.ui.bean.delivery.DeliveryBean.getTimeBeforeDueRetract(DeliveryBean.java:3686)
          at org.sakaiproject.tool.assessment.ui.listener.delivery.BeginDeliveryActionListener.setTimedAssessment(BeginDeliveryActionListener.java:445)
          at org.sakaiproject.tool.assessment.ui.listener.delivery.BeginDeliveryActionListener.populateDelivery(BeginDeliveryActionListener.java:361)
          at org.sakaiproject.tool.assessment.ui.listener.delivery.BeginDeliveryActionListener.populateBeanFromPub(BeginDeliveryActionListener.java:230)
          at org.sakaiproject.tool.assessment.ui.listener.delivery.BeginDeliveryActionListener.processAction(BeginDeliveryActionListener.java:198)
      

      Although we spent some time investigating this issue, we've been unable to determine exact steps to reproduce or how the null is getting into the database. However, given the common stack trace, it's fairly trivial to introduce some NPE protection around the beginTime object inside DeliveryBean.getTimeBeforeDue(String) and DeliveryBean.getTimeBeforeRetract(String).

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bjones86 Brian Jones
                Reporter:
                bjones86 Brian Jones
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code