[ 
https://issues.apache.org/jira/browse/JEXL-144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Woonsan Ko updated JEXL-144:
----------------------------

    Attachment: jexl3-empty-array-patch-3.txt
                jexl2-empty-array-patch-3.txt

Hi Henri,

Thanks a lot for the review and remark!
I'm attaching a revised patch for 2.0 branch (jexl2-empty-array-patch-3.txt) 
and another for trunk (jexl3-empty-array-patch-3.txt) which don't have 
'isEmptyArrayValue' member any more.

Regarding "another way (from the JEXL3/Uberspect)", yes, that looks a lot 
better to add this kind of code in Uberspect.java maybe instead of 
PropertySetExecutor even though I don't fully understand the design changes in 
JEXL3 yet. I'll try to understand JEXL3 Uberspect and try a patch in that way 
soon. (So, you can disregard the patch for trunk now.)

By the way, I'm going to use JEXL2 in our document processing engine module 
(which is based on SCXML 2.0) in the short term. So, we're definitely 
interested in having this feature in JEXL2, not JEXL3 in the short term.
In the longer term, I'll probably want to upgrade it to JEXL3 because it might 
be more flexible/customizable and stable.

Best,

Woonsan

> Empty array property setting fails
> ----------------------------------
>
>                 Key: JEXL-144
>                 URL: https://issues.apache.org/jira/browse/JEXL-144
>             Project: Commons JEXL
>          Issue Type: Bug
>            Reporter: Woonsan Ko
>             Fix For: 2.1.2, 3.0
>
>         Attachments: jexl2-empty-array-patch-2.txt, 
> jexl2-empty-array-patch-3.txt, jexl2-empty-array-patch.txt, 
> jexl3-empty-array-patch-2.txt, jexl3-empty-array-patch-3.txt, 
> jexl3-empty-array-patch.txt
>
>
> Suppose a bean has an array property setter method (e.g, public void 
> setStrarr(String []) ).
> If I use an expression like this with an empty array, then it fails with the 
> error message, "inaccessible or unknown property strarr".
>   // example expression
>   bean.strarr = [ ];



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to