struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bphill...@apache.org
Subject svn commit: r1512348 - /struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/CheckboxListHandler.java
Date Fri, 09 Aug 2013 15:41:11 GMT
Author: bphillips
Date: Fri Aug  9 15:41:10 2013
New Revision: 1512348

URL: http://svn.apache.org/r1512348
Log:
WW-4168 Added if statement in method isChecked to verify that the String Array of checkBox
name values is not null.  

Modified:
    struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/CheckboxListHandler.java

Modified: struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/CheckboxListHandler.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/CheckboxListHandler.java?rev=1512348&r1=1512347&r2=1512348&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/CheckboxListHandler.java
(original)
+++ struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/simple/CheckboxListHandler.java
Fri Aug  9 15:41:10 2013
@@ -106,10 +106,12 @@ public class CheckboxListHandler extends
         Boolean checked = false;
         if (itemKeyStr != null) {
             String[] nameValues = (String[]) params.get("nameValue");
-            for (String value : nameValues) {
-                if (checked = value.equalsIgnoreCase(itemKeyStr)) {
-                    break;
-                }
+            if (nameValues != null) {
+	            for (String value : nameValues) {
+	                if (checked = value.equalsIgnoreCase(itemKeyStr)) {
+	                    break;
+	                }
+	            }
             }
         }
         return checked;



Mime
View raw message