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

Henri Biestro updated JEXL-398:
-------------------------------
    Fix Version/s: 3.3.1

> Allow 'trailing commas' or ellipsis while defining array, map and set literals
> ------------------------------------------------------------------------------
>
>                 Key: JEXL-398
>                 URL: https://issues.apache.org/jira/browse/JEXL-398
>             Project: Commons JEXL
>          Issue Type: New Feature
>    Affects Versions: 3.3
>            Reporter: Xu Pengcheng
>            Assignee: Henri Biestro
>            Priority: Minor
>             Fix For: 3.3.1
>
>
> Allowing trailing commas in structured literals (array, set, map) as a 
> convenient syntactic leniency. :)
> {code:java}
> let m = { "foo": 1, "bar": 2, };
> let a = [ 1, 2, ];
> let s = (1, 2, );{code}
> Using a trailing ellipsis (...) to alter the concrete class materialized as a 
> convenient semantic shortcut.
> {code:java}
> let m = { "foo": 1, "bar": 2, ... }; // LinkedHashMap
> let a = [ 1, 2, ...]; // ArrayList
> let s = (1, 2, ...); // LinkedHashSet{code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to