You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2021/04/16 09:13:20 UTC
[isis] branch master updated: ISIS-2569: fix potential NPE in
BookmarkService#bookmarkForElseFail
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 5356361 ISIS-2569: fix potential NPE in BookmarkService#bookmarkForElseFail
5356361 is described below
commit 535636163e320e53b46c7c51a4716258deca6fd1
Author: Andi Huber <ah...@apache.org>
AuthorDate: Fri Apr 16 11:13:12 2021 +0200
ISIS-2569: fix potential NPE in BookmarkService#bookmarkForElseFail
---
.../org/apache/isis/applib/services/bookmark/BookmarkService.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/api/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkService.java b/api/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkService.java
index 467c0f3..35e8ad3 100644
--- a/api/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkService.java
+++ b/api/applib/src/main/java/org/apache/isis/applib/services/bookmark/BookmarkService.java
@@ -91,7 +91,10 @@ public interface BookmarkService {
default Bookmark bookmarkForElseFail(@Nullable Object domainObject) {
return bookmarkFor(domainObject)
.orElseThrow(()->_Exceptions.illegalArgument(
- "cannot create bookmark for type %s", domainObject.getClass().getName()));
+ "cannot create bookmark for type %s",
+ domainObject!=null
+ ? domainObject.getClass().getName()
+ : "<null>"));
}
}