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 2022/11/11 19:08:55 UTC

[myfaces] branch 3.0.x updated: MYFACES-4495: Throw NPE when necessary (#379)

This is an automated email from the ASF dual-hosted git repository.

melloware pushed a commit to branch 3.0.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/3.0.x by this push:
     new ffef66541 MYFACES-4495: Throw NPE when necessary (#379)
ffef66541 is described below

commit ffef6654194f7917d24d9f8585c714c3b5bd55c4
Author: Paul A. Nicolucci <pn...@gmail.com>
AuthorDate: Fri Nov 11 14:08:50 2022 -0500

    MYFACES-4495: Throw NPE when necessary (#379)
---
 impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java b/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
index 847344615..2701e2bed 100755
--- a/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
+++ b/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
@@ -588,6 +588,7 @@ public class ApplicationImpl extends Application
     public void publishEvent(FacesContext facesContext, Class<? extends SystemEvent> systemEventClass,
                              Class<?> sourceBaseType, Object source)
     {
+        checkNull(facesContext, "facesContext");
         checkNull(systemEventClass, "systemEventClass");
         checkNull(source, "source");
         
@@ -646,6 +647,7 @@ public class ApplicationImpl extends Application
     @Override
     public void publishEvent(FacesContext facesContext, Class<? extends SystemEvent> systemEventClass, Object source)
     {
+        checkNull(source, "source");
         publishEvent(facesContext, systemEventClass, source.getClass(), source);
     }