You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Biestro (Jira)" <ji...@apache.org> on 2019/12/11 21:29:00 UTC

[jira] [Commented] (JEXL-298) Unable to call 'empty' and 'size' member methods with parameters

    [ https://issues.apache.org/jira/browse/JEXL-298?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16993912#comment-16993912 ] 

Henri Biestro commented on JEXL-298:
------------------------------------

Changeset: b15ac35b53438f733afdca5b1015f248f6669c4a
Author:    henrib <he...@apache.org>
Date:      2019-12-11 22:23
Message:   JEXL-298: size/empty overloads could break operator resolution and return null (instead of a number/boolean), fix and test

> Unable to call 'empty' and 'size' member methods with parameters
> ----------------------------------------------------------------
>
>                 Key: JEXL-298
>                 URL: https://issues.apache.org/jira/browse/JEXL-298
>             Project: Commons JEXL
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Dmitri Blinov
>            Assignee: Henri Biestro
>            Priority: Major
>             Fix For: 3.2
>
>
> It's not possible to parse scripts like
> {code:java}
> x.size(0){code}
> or
> {code:java}
> x.empty(0){code}
> because of current syntax restrictions.
> {{empty}} and {{size}} are perfectly valid method identifiers in java, and though uncommon, can be declared with arguments. As of now Jexl allows only to call parameterless {{empty()}} and {{size()}} methods



--
This message was sent by Atlassian Jira
(v8.3.4#803005)