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


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.

Reply via email to