myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jak...@apache.org
Subject svn commit: r935876 - /myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
Date Tue, 20 Apr 2010 11:35:05 GMT
Author: jakobk
Date: Tue Apr 20 11:35:05 2010
New Revision: 935876

URL: http://svn.apache.org/viewvc?rev=935876&view=rev
Log:
MYFACES-2663 NPE in UIParameter when value resolves to null (changed log messages for h:link
and h:button regarding null-values)

Modified:
    myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java

Modified: myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java?rev=935876&r1=935875&r2=935876&view=diff
==============================================================================
--- myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
(original)
+++ myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlRendererUtils.java
Tue Apr 20 11:35:05 2010
@@ -1869,17 +1869,23 @@ public final class HtmlRendererUtils {
                     continue;
                 }
                 String name = param.getName();
-                if ((name == null || STR_EMPTY.equals(name)) 
-                        && facesContext.isProjectStage(ProjectStage.Development))
+                if (name == null || STR_EMPTY.equals(name))
                 {
                     // warn for a null-name
                     log.log(Level.WARNING, "The UIParameter " + RendererUtils.getPathToComponent(param)
+
                             " has a name of null or empty string and thus will not be added
to the URL.");
+                    // and skip it
                     continue;
                 }
                 Object value = param.getValue();
                 if (value == null)
                 {
+                    if (facesContext.isProjectStage(ProjectStage.Development))
+                    {
+                        // inform the user about the null value when in Development stage
+                        log.log(Level.INFO, "The UIParameter " + RendererUtils.getPathToComponent(param)
+
+                                " has a value of null and thus will not be added to the URL.");
+                    }
                     // skip a null-value
                     continue;
                 }



Mime
View raw message