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

Incorrect indices when parsing events strings

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Awaiting Review
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 19.3, 20.0 [Tentative]
    • Fix Version/s: None
    • Component/s: Gradebook
    • Labels:
      None
    • Test Plan:
      Hide

      Please add a Test Plan here.

      Show
      Please add a Test Plan here.

      Description

      This issue is pretty weird, because I can't reproduce it in any QA server, but I have verified that the code mismatch which produces it is currently in the master's code, so maybe the events are not used there.

      In EventHelper class on GradebookNG this line:

      https://github.com/sakaiproject/sakai/blob/master/gradebookng/tool/src/java/org/sakaiproject/gradebookng/business/util/EventHelper.java#L16

      adds a slash in the beggining of every event from Gradebook.

      Later, in this line of ResourceReleaseRule.java on Kernel:

      https://github.com/sakaiproject/sakai/blob/master/kernel/kernel-impl/src/main/java/org/sakaiproject/conditions/impl/ResourceReleaseRule.java#L362

      that first slash causes an empty string to be added to the array of event parts, causing errors, i.e. the parse of a number as date throws a NumberFormatException.

      This can be easily tested in our deployment editing a Gradebook item and saving it again. A stacktrace is thrown into logs. However, when I do these steps in a QA server, no stacktrace is showed.

      If this is an issue, the fix is pretty simple, but I need some confirmation.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                maintenanceteam Core Team
                Reporter:
                daniel.merino Daniel Merino Echeverría
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Git Source Code