[
https://issues.apache.org/struts/browse/WW-3007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Wes Wannemacher updated WW-3007:
--------------------------------
Fix Version/s: 2.1.7
> org.apache.struts2.util.ContainUtil.contains
> --------------------------------------------
>
> Key: WW-3007
> URL: https://issues.apache.org/struts/browse/WW-3007
> Project: Struts 2
> Issue Type: Bug
> Components: Expression Language
> Affects Versions: 2.1.6
> Environment: All
> Reporter: Luis Gervaso Martin
> Fix For: 2.1.7
>
>
> When we use a
> String[] selectedValues in the Action and the beans keys are for example Long
> this is not working
> <@s.checkboxlist name="selectedValues" list=q.choices listKey="id"
> listValue="label" />
> (id is a Long)
> It's working if we use a java.util.List selectedValues
> The issue comes from ContainUtil class
> In arrays we don't check the String value
> if (obj1 instanceof Iterable) {
> ...
> if (obj2.equals(value) || obj2.toString().equals(value)) { //(works ok)
> BUT
> } else if (obj1.getClass().isArray()) {
> ...
> if (value.equals(obj2)) { //(it's not working)
> Thanks
> Luis
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.