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/12/22 15:10:53 UTC
[isis] branch master updated: ISIS-2921: fixes NPE on EntityPage deserialization
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 56b37ee ISIS-2921: fixes NPE on EntityPage deserialization
56b37ee is described below
commit 56b37ee82eada2b2c8f8784e35278033631260ce
Author: Andi Huber <ah...@apache.org>
AuthorDate: Wed Dec 22 16:09:24 2021 +0100
ISIS-2921: fixes NPE on EntityPage deserialization
---
.../isis/viewer/wicket/ui/pages/entity/EntityPage.java | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
index 2ef0f54..82fc229 100644
--- a/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
+++ b/viewers/wicket/ui/src/main/java/org/apache/isis/viewer/wicket/ui/pages/entity/EntityPage.java
@@ -274,14 +274,20 @@ public class EntityPage extends PageAbstract {
// -- HELPER
- private transient ObjectReference<UUID> interactionId = _Refs.objectRef(null);
+ private transient ObjectReference<UUID> interactionId;
+ private ObjectReference<UUID> interactionIdRef() {
+ if(interactionId==null) {
+ interactionId = _Refs.objectRef(null);
+ }
+ return interactionId;
+ }
private boolean isAlreadyRefreshedWithinThisInteraction() {
val currentInteractionId = getCommonContext()
.getInteractionProvider().getInteractionId().orElseThrow();
val alreadyRefreshedForThisInteraction =
- interactionId.getValue()
+ interactionIdRef().getValue()
.map(currentInteractionId::equals)
.orElse(false);
@@ -289,7 +295,7 @@ public class EntityPage extends PageAbstract {
return true;
}
- interactionId.setValue(currentInteractionId);
+ interactionIdRef().setValue(currentInteractionId);
return false;
}