This is an automated email from the ASF dual-hosted git repository. ahuber pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push: new 516a18cfe4 ISIS-3289: fixes NPE in CalendarEvent showcase 516a18cfe4 is described below commit 516a18cfe4c7bd598caa1fb5615d3353e1707af3 Author: Andi Huber <ahu...@apache.org> AuthorDate: Mon Nov 21 17:12:43 2022 +0100 ISIS-3289: fixes NPE in CalendarEvent showcase --- .../causewayext/cal/persistence/CausewayCalendarEventEntity.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/causewayext/cal/persistence/CausewayCalendarEventEntity.java b/examples/demo/domain/src/main/java/demoapp/dom/types/causewayext/cal/persistence/CausewayCalendarEventEntity.java index 0b823ac925..238bef577a 100644 --- a/examples/demo/domain/src/main/java/demoapp/dom/types/causewayext/cal/persistence/CausewayCalendarEventEntity.java +++ b/examples/demo/domain/src/main/java/demoapp/dom/types/causewayext/cal/persistence/CausewayCalendarEventEntity.java @@ -18,6 +18,8 @@ */ package demoapp.dom.types.causewayext.cal.persistence; +import java.util.Optional; + import javax.inject.Named; import org.apache.causeway.applib.annotation.DomainObject; @@ -46,7 +48,9 @@ implements @Override public String getCalendarName() { - return toCalendarEvent().getCalendarName(); + return Optional.ofNullable(toCalendarEvent()) + .map(CalendarEvent::getCalendarName) + .orElse(null); } @Override