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:18:16 UTC
(myfaces) branch 4.0.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.0.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git
The following commit(s) were added to refs/heads/4.0.x by this push:
new 09c8944a3 MYFACES-4714 Possible NPE in ClientWindowScopeContext#getContextualStorage
09c8944a3 is described below
commit 09c8944a3c261527aa2f93f8b4f9230f91e91584
Author: tandraschko <ta...@apache.org>
AuthorDate: Wed May 7 20:17:55 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));