Description
_isAjaxRequest = facesContext.getPartialViewContext().isAjaxRequest();
occurs 2 times in SwitchAjaxExceptionHandlerWrapperImpl and facesContext.getPartialViewContext() can be null.
We should just return false if it's null.
StackTrace:
java.lang.NullPointerException
at org.apache.myfaces.shared.context.SwitchAjaxExceptionHandlerWrapperImpl.isAjaxRequest(SwitchAjaxExceptionHandlerWrapperImpl.java:98)
at org.apache.myfaces.shared.context.SwitchAjaxExceptionHandlerWrapperImpl.getWrapped(SwitchAjaxExceptionHandlerWrapperImpl.java:106)
at javax.faces.context.ExceptionHandlerWrapper.isListenerForSource(ExceptionHandlerWrapper.java:70)
at javax.faces.context.ExceptionHandlerWrapper.isListenerForSource(ExceptionHandlerWrapper.java:70)
at javax.faces.context.ExceptionHandlerWrapper.isListenerForSource(ExceptionHandlerWrapper.java:70)
at org.apache.myfaces.application.ApplicationImpl._traverseListenerList(ApplicationImpl.java:2480)
at org.apache.myfaces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:586)
at org.apache.myfaces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:616)
at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:336)
at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:336)
at javax.faces.application.ApplicationWrapper.publishEvent(ApplicationWrapper.java:336)
at org.apache.deltaspike.jsf.impl.injection.InjectionAwareApplicationWrapper.publishEvent(InjectionAwareApplicationWrapper.java:121)
at org.apache.myfaces.lifecycle.PhaseListenerManager.publishException(PhaseListenerManager.java:136)
at org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersAfter(PhaseListenerManager.java:123)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:185)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
at org.apache.deltaspike.jsf.impl.listener.request.DeltaSpikeLifecycleWrapper.execute(DeltaSpikeLifecycleWrapper.java:89)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)