From 5ed5652531f37dffa5670fd006ffc8de23c28b27 Mon Sep 17 00:00:00 2001 From: Bauke Scholtz Date: Sat, 2 Mar 2024 13:49:36 -0400 Subject: [PATCH] Reduce logging level of exception which is already rethrown during processing a lifecycle phase -- this only causes duplicate logs https://github.com/eclipse-ee4j/mojarra/issues/5404 --- .../java/com/sun/faces/lifecycle/ApplyRequestValuesPhase.java | 4 ++-- .../java/com/sun/faces/lifecycle/InvokeApplicationPhase.java | 4 ++-- .../java/com/sun/faces/lifecycle/ProcessValidationsPhase.java | 4 ++-- .../java/com/sun/faces/lifecycle/UpdateModelValuesPhase.java | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/impl/src/main/java/com/sun/faces/lifecycle/ApplyRequestValuesPhase.java b/impl/src/main/java/com/sun/faces/lifecycle/ApplyRequestValuesPhase.java index a2dfb81fb7..29726ae126 100644 --- a/impl/src/main/java/com/sun/faces/lifecycle/ApplyRequestValuesPhase.java +++ b/impl/src/main/java/com/sun/faces/lifecycle/ApplyRequestValuesPhase.java @@ -52,8 +52,8 @@ public void execute(FacesContext facesContext) throws FacesException { } catch (RuntimeException re) { String exceptionMessage = re.getMessage(); if (null != exceptionMessage) { - if (LOGGER.isLoggable(Level.WARNING)) { - LOGGER.log(Level.WARNING, exceptionMessage, re); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, exceptionMessage, re); } } throw new FacesException(exceptionMessage, re); diff --git a/impl/src/main/java/com/sun/faces/lifecycle/InvokeApplicationPhase.java b/impl/src/main/java/com/sun/faces/lifecycle/InvokeApplicationPhase.java index 1ccd7d919f..717714835d 100644 --- a/impl/src/main/java/com/sun/faces/lifecycle/InvokeApplicationPhase.java +++ b/impl/src/main/java/com/sun/faces/lifecycle/InvokeApplicationPhase.java @@ -57,8 +57,8 @@ public void execute(FacesContext facesContext) throws FacesException { } catch (RuntimeException re) { String exceptionMessage = re.getMessage(); if (null != exceptionMessage) { - if (LOGGER.isLoggable(Level.WARNING)) { - LOGGER.log(Level.WARNING, exceptionMessage, re); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, exceptionMessage, re); } } throw new FacesException(exceptionMessage, re); diff --git a/impl/src/main/java/com/sun/faces/lifecycle/ProcessValidationsPhase.java b/impl/src/main/java/com/sun/faces/lifecycle/ProcessValidationsPhase.java index 9eb4a8cf1e..675a95754a 100644 --- a/impl/src/main/java/com/sun/faces/lifecycle/ProcessValidationsPhase.java +++ b/impl/src/main/java/com/sun/faces/lifecycle/ProcessValidationsPhase.java @@ -50,8 +50,8 @@ public void execute(FacesContext facesContext) throws FacesException { } catch (RuntimeException re) { String exceptionMessage = re.getMessage(); if (null != exceptionMessage) { - if (LOGGER.isLoggable(Level.WARNING)) { - LOGGER.log(Level.WARNING, exceptionMessage, re); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, exceptionMessage, re); } } throw new FacesException(exceptionMessage, re); diff --git a/impl/src/main/java/com/sun/faces/lifecycle/UpdateModelValuesPhase.java b/impl/src/main/java/com/sun/faces/lifecycle/UpdateModelValuesPhase.java index b4cf5b56e9..adf3edb904 100644 --- a/impl/src/main/java/com/sun/faces/lifecycle/UpdateModelValuesPhase.java +++ b/impl/src/main/java/com/sun/faces/lifecycle/UpdateModelValuesPhase.java @@ -51,8 +51,8 @@ public void execute(FacesContext facesContext) { } catch (RuntimeException re) { String exceptionMessage = re.getMessage(); if (null != exceptionMessage) { - if (LOGGER.isLoggable(Level.WARNING)) { - LOGGER.log(Level.WARNING, exceptionMessage, re); + if (LOGGER.isLoggable(Level.FINE)) { + LOGGER.log(Level.FINE, exceptionMessage, re); } } throw new FacesException(exceptionMessage, re);