You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by me...@apache.org on 2023/01/06 18:20:52 UTC
[myfaces] branch main updated: MYFACES-4541: NPE check on destroying view (#471)
This is an automated email from the ASF dual-hosted git repository.
melloware pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/main by this push:
new 68b80ea30 MYFACES-4541: NPE check on destroying view (#471)
68b80ea30 is described below
commit 68b80ea305b2d3c9b9ea6603cf577f2e5d35cf9c
Author: Melloware <me...@gmail.com>
AuthorDate: Fri Jan 6 13:20:47 2023 -0500
MYFACES-4541: NPE check on destroying view (#471)
---
.../apache/myfaces/cdi/util/AbstractContextualStorageHolder.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/util/AbstractContextualStorageHolder.java b/impl/src/main/java/org/apache/myfaces/cdi/util/AbstractContextualStorageHolder.java
index f97dede3e..fa677fb61 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/util/AbstractContextualStorageHolder.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/util/AbstractContextualStorageHolder.java
@@ -211,10 +211,12 @@ public abstract class AbstractContextualStorageHolder<T extends ContextualStorag
if (!skip)
{
Contextual bean = contextualStorage.getBean(entry.getKey());
-
ContextualInstanceInfo<?> contextualInstanceInfo = entry.getValue();
- bean.destroy(contextualInstanceInfo.getContextualInstance(),
- contextualInstanceInfo.getCreationalContext());
+ if (bean != null && contextualInstanceInfo != null)
+ {
+ bean.destroy(contextualInstanceInfo.getContextualInstance(),
+ contextualInstanceInfo.getCreationalContext());
+ }
}
}