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/03/28 09:09:00 UTC

[jira] [Resolved] (JEXL-294) expression:b == true , when b="abc" then return true

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

Henri Biestro resolved JEXL-294.
--------------------------------
       Resolution: Not A Problem
    Fix Version/s: 3.1

Works as intended, other behaviours are possible through arithmetic customisation.

> expression:b == true , when b="abc" then return true
> ----------------------------------------------------
>
>                 Key: JEXL-294
>                 URL: https://issues.apache.org/jira/browse/JEXL-294
>             Project: Commons JEXL
>          Issue Type: Bug
>    Affects Versions: 3.1
>         Environment: java 8
> commons-jexl 3.1
>            Reporter: 锁战强
>            Assignee: Henri Biestro
>            Priority: Blocker
>             Fix For: 3.1
>
>
> It seems a bit odd that the expression "abc" == true returns true.
> {code:java}
>     
>     @Test
>     public void test294() throws Exception {
>         final String str = "(b)->{ b == true }";
>         JexlContext ctxt = new MapContext();
>         JexlEngine jexl = new JexlBuilder().create();
>         JexlScript e = jexl.createScript(str);
>         Object value = e.execute(ctxt, "abc");
>         Assert.assertEquals(true, value); // "abc" == true ??
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)