-
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
-
Funded by:
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);