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 2023/01/16 09:52:18 UTC

[myfaces] branch 2.3.x updated: MYFACES-4545: 2.3 BeanValidator warning on in Development mode (#477)

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

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


The following commit(s) were added to refs/heads/2.3.x by this push:
     new 7a632de89 MYFACES-4545: 2.3 BeanValidator warning on in Development mode (#477)
7a632de89 is described below

commit 7a632de89fd72641db3eec572bb538b5865f8413
Author: Melloware <me...@gmail.com>
AuthorDate: Mon Jan 16 04:52:14 2023 -0500

    MYFACES-4545: 2.3 BeanValidator warning on in Development mode (#477)
---
 api/src/main/java/javax/faces/validator/BeanValidator.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/api/src/main/java/javax/faces/validator/BeanValidator.java b/api/src/main/java/javax/faces/validator/BeanValidator.java
index 9ce8716dc..13afda902 100644
--- a/api/src/main/java/javax/faces/validator/BeanValidator.java
+++ b/api/src/main/java/javax/faces/validator/BeanValidator.java
@@ -38,6 +38,7 @@ import javax.el.ValueReference;
 import javax.el.VariableMapper;
 import javax.faces.FacesException;
 import javax.faces.application.FacesMessage;
+import javax.faces.application.ProjectStage;
 import javax.faces.component.PartialStateHolder;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
@@ -154,8 +155,11 @@ public class BeanValidator implements Validator, PartialStateHolder
         ValueExpression valueExpression = component.getValueExpression("value");
         if (valueExpression == null)
         {
-            log.warning("cannot validate component with empty value: " 
+            if (context.isProjectStage(ProjectStage.Development))
+            {
+                log.warning("cannot validate component with empty value: " 
                     + component.getClientId(context));
+            }
             return;
         }