Uploaded image for project: 'OpenOLAT'
  1. OpenOLAT
  2. OO-3072

Bulk assessment: identity list can be null

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 12.1.2
    • Fix Version/s: 12.1.3
    • Component/s: None
    • Labels:
      None

      Description

      Under some circumstances it is possible that in validation stewp of bulk assessment a list of identities can be null. Therefor an exception is thrown:

      ^%^ ExceptionWindowController: Throwable occurred, logging the full
      > stacktrace: ^%^ >>>stack of 1.cause::java.lang.NullPointerException: null ->
      at org.olat.course.assessment.bulk.ValidationStepForm.loadAssessedIdentities(ValidationStepForm.java:167)
      at org.olat.course.assessment.bulk.ValidationStepForm.doValidateRows(ValidationStepForm.java:134)
      at org.olat.course.assessment.bulk.ValidationStepForm.doValidate(ValidationStepForm.java:121)
      

       

      This patch avoids that:

      diff --git a/src/main/java/org/olat/course/assessment/bulk/ValidationStepForm.java b/src/main/java/org/olat/course/assessment/bulk/ValidationStepForm.java
      --- a/src/main/java/org/olat/course/assessment/bulk/ValidationStepForm.java
      +++ b/src/main/java/org/olat/course/assessment/bulk/ValidationStepForm.java
      @@ -164,7 +164,7 @@
       
                   for(String prop : userPropsToSearch) {
                       List<Identity> found = userManager.findIdentitiesWithProperty(prop, assessedId);
      -                if(found.size() > 0) {
      +                if(found != null && found.size() > 0) {
                           // ignore multiple hits, just take the first one
                           identity = found.get(0);
                           idToIdentityMap.put(assessedId, identity);
      

        Attachments

          Activity

            People

            Assignee:
            srosse Stéphane Rossé
            Reporter:
            stephan Stephan Clemenz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 25 minutes
                25m