From c019cca196429bf78aa6298f2fdc030af529ac4e Mon Sep 17 00:00:00 2001
From: Cedric Willekens <c.s.willekens@student.tudelft.nl>
Date: Thu, 13 Jan 2022 09:48:28 +0100
Subject: [PATCH] Fix null pointer in lab patch
Signed-off-by: Cedric Willekens <c.s.willekens@student.tudelft.nl>
---
CHANGELOG.md | 1 +
src/main/java/nl/tudelft/queue/dto/patch/LabPatchDTO.java | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cf057a414..3b0ae0262 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Add an indication on number of slots taken [@cedricwilleken](https://gitlab.ewi.tudelft.nl/cedricwilleken)
- Add progress indicator for exam labs [@cedricwilleken](https://gitlab.ewi.tudelft.nl/cedricwilleken)
- Add request type filtering to status page [@cedricwilleken](https://gitlab.ewi.tudelft.nl/cedricwilleken)
+- Allow jitsi labs to have no rooms [@cedricwilleken](https://gitlab.ewi.tudelft.nl/cedricwilleken)
### Changed
- Redirect students to their request when their are being processed when accessing the lab page. [@cedricwilleken](https://gitlab.ewi.tudelft.nl/cedricwilleken)
diff --git a/src/main/java/nl/tudelft/queue/dto/patch/LabPatchDTO.java b/src/main/java/nl/tudelft/queue/dto/patch/LabPatchDTO.java
index 24445d380..a574df6dd 100644
--- a/src/main/java/nl/tudelft/queue/dto/patch/LabPatchDTO.java
+++ b/src/main/java/nl/tudelft/queue/dto/patch/LabPatchDTO.java
@@ -67,7 +67,7 @@ public abstract class LabPatchDTO<D extends Lab> extends QueueSessionPatchDTO<D>
protected void validate() {
super.validate();
nonEmpty("requestTypes", requestTypes);
- if (!communicationMethod.equals(CommunicationMethod.JITSI_MEET)) {
+ if (!CommunicationMethod.JITSI_MEET.equals(communicationMethod)) {
nonEmpty("rooms", super.getRooms());
}
}
--
GitLab