You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2025/05/07 18:17:14 UTC
(myfaces) branch 4.1.x updated: MYFACES-4714 Possible NPE in ClientWindowScopeContext#getContextualStorage
This is an automated email from the ASF dual-hosted git repository.
tandraschko pushed a commit to branch 4.1.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/4.1.x by this push:
new 109a90018 MYFACES-4714 Possible NPE in ClientWindowScopeContext#getContextualStorage
109a90018 is described below
commit 109a90018bba2f9b76e726331de6b0949bf7d67c
Author: tandraschko <ta...@apache.org>
AuthorDate: Wed May 7 20:16:57 2025 +0200
MYFACES-4714 Possible NPE in ClientWindowScopeContext#getContextualStorage
---
.../org/apache/myfaces/cdi/clientwindow/ClientWindowScopeContext.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/impl/src/main/java/org/apache/myfaces/cdi/clientwindow/ClientWindowScopeContext.java b/impl/src/main/java/org/apache/myfaces/cdi/clientwindow/ClientWindowScopeContext.java
index 293ab4088..8a8d1e6ae 100644
--- a/impl/src/main/java/org/apache/myfaces/cdi/clientwindow/ClientWindowScopeContext.java
+++ b/impl/src/main/java/org/apache/myfaces/cdi/clientwindow/ClientWindowScopeContext.java
@@ -117,6 +117,10 @@ public <T> T get(Contextual<T> bean, CreationalContext<T> creationalContext)
checkActive(facesContext);
ContextualStorage storage = getContextualStorage(facesContext, true);
+ if (storage == null)
+ {
+ return null;
+ }
Map<Object, ContextualInstanceInfo<?>> contextMap = storage.getStorage();
ContextualInstanceInfo<?> contextualInstanceInfo = contextMap.get(storage.getBeanKey(bean));