From ab95959472c040e344243eacb2456b491b014e2c Mon Sep 17 00:00:00 2001 From: j-dimension Date: Mon, 25 Nov 2024 20:16:54 +0100 Subject: [PATCH] fixed NPE in calendar conflict check. close #2704 --- .../calendar/model/CalendarEvent.java | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/j-lawyer-client/src/de/costache/calendar/model/CalendarEvent.java b/j-lawyer-client/src/de/costache/calendar/model/CalendarEvent.java index af0d8fc0f..1ababf072 100644 --- a/j-lawyer-client/src/de/costache/calendar/model/CalendarEvent.java +++ b/j-lawyer-client/src/de/costache/calendar/model/CalendarEvent.java @@ -293,7 +293,9 @@ public String toString() { } public String getCaseLawyer() { - return this.getCaseDto().getLawyer(); + if(this.getCaseDto()!=null) + return this.getCaseDto().getLawyer(); + return ""; } public String getAssignee() { @@ -308,28 +310,38 @@ public enum Property { * @return the caseId */ public String getCaseId() { - return this.getCaseDto().getId(); + if(this.getCaseDto()!=null) + return this.getCaseDto().getId(); + return ""; + } /** * @return the caseNumber */ public String getCaseNumber() { - return this.getCaseDto().getFileNumber(); + if(this.getCaseDto()!=null) + return this.getCaseDto().getFileNumber(); + return ""; + } /** * @return the caseName */ public String getCaseName() { - return this.getCaseDto().getName(); + if(this.getCaseDto()!=null) + return this.getCaseDto().getName(); + return ""; } /** * @return the caseReason */ public String getCaseReason() { - return this.getCaseDto().getReason(); + if(this.getCaseDto()!=null) + return this.getCaseDto().getReason(); + return ""; } /**