From 0ae839a8d0fbe597f28a76227b98db7e63f80caf Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Thu, 19 Oct 2023 16:41:05 -0500 Subject: [PATCH] [MOJARRA_5341] UnsupportedOperationException in InitFacesContext Provide an ExceptionHandler in getExceptionHandler() --- .../main/java/com/sun/faces/config/InitFacesContext.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/impl/src/main/java/com/sun/faces/config/InitFacesContext.java b/impl/src/main/java/com/sun/faces/config/InitFacesContext.java index 96c3312dec..0de180d621 100644 --- a/impl/src/main/java/com/sun/faces/config/InitFacesContext.java +++ b/impl/src/main/java/com/sun/faces/config/InitFacesContext.java @@ -32,6 +32,7 @@ import com.sun.faces.config.initfacescontext.NoOpFacesContext; import com.sun.faces.config.initfacescontext.ServletContextAdapter; import com.sun.faces.context.ApplicationMap; +import com.sun.faces.context.ExceptionHandlerImpl; import com.sun.faces.util.FacesLogger; import com.sun.faces.util.Util; @@ -41,6 +42,7 @@ import jakarta.faces.application.ApplicationFactory; import jakarta.faces.application.ProjectStage; import jakarta.faces.component.UIViewRoot; +import jakarta.faces.context.ExceptionHandler; import jakarta.faces.context.ExternalContext; import jakarta.faces.context.FacesContext; import jakarta.servlet.ServletContext; @@ -109,6 +111,11 @@ public Application getApplication() { return factory.getApplication(); } + @Override + public ExceptionHandler getExceptionHandler() { + return new ExceptionHandlerImpl(false); + } + @Override public boolean isProjectStage(ProjectStage stage) { if (stage == null) {