You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Woonsan Ko <wo...@yahoo.com> on 2013/11/02 06:07:42 UTC

Re: [JEXL] How to set an empty string array property value?

I created a JIRA issue for this and attached patches:
- https://issues.apache.org/jira/browse/JEXL-144

I think it's a good improvement because it is very natural to try to set an empty array property like the following:


    // setting an empty array

    bean.strarr =  [ ];


I hope the patches fix this issue. Please review them.

Cheers,

Woonsan



On Thursday, October 31, 2013 5:17 PM, Woonsan Ko <wo...@yahoo.com> wrote:
 
Hi,
>
>I'm testing with JEXL 2.1.2-SNAPSHOT (The 2.0 branch snapshot).
>My bean has a property setter with string array.
>
>
>    public void setValues(String[] values) {
>        // ...
>    }
>
>And, a JEXL script setting an empty array like the following seems to fail and maybe it even fails to find the property setter method:
>
>  mybean.values = [];
>Is it because it always tries to match a method with 'Object []' argument?
>If so, isn't it something to improve?
>
>Regards,
>
>Woonsan
>
>
>