WW-4168 Added if statement in method isChecked to verify that the String Array of checkBox name values is not null.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1512348 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bruce Allen Phillips
2013-08-09 15:41:10 +00:00
parent 2a3e504584
commit f046343833
@@ -106,10 +106,12 @@ public class CheckboxListHandler extends AbstractTagHandler implements TagGenera
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;