From 349303c1686970d1b639e62f88d7757b9a9abc89 Mon Sep 17 00:00:00 2001 From: anhefti Date: Tue, 21 Sep 2021 14:43:41 +0200 Subject: [PATCH] fixed monitoring with no indicators --- .../session/impl/indicator/AbstractClientIndicator.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/AbstractClientIndicator.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/AbstractClientIndicator.java index 9790c05a..c5fa6bfb 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/AbstractClientIndicator.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/indicator/AbstractClientIndicator.java @@ -36,8 +36,12 @@ public abstract class AbstractClientIndicator implements ClientIndicator { final boolean active, final boolean cachingEnabled) { - this.indicatorId = (indicatorDefinition != null) ? indicatorDefinition.id : -1; - this.examId = (indicatorDefinition != null) ? indicatorDefinition.examId : -1; + this.indicatorId = (indicatorDefinition != null && indicatorDefinition.id != null) + ? indicatorDefinition.id + : -1; + this.examId = (indicatorDefinition != null && indicatorDefinition.examId != null) + ? indicatorDefinition.examId + : -1; this.connectionId = connectionId; this.active = active; this.cachingEnabled = cachingEnabled;