commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 锁战强 (JIRA) <j...@apache.org>
Subject [jira] [Commented] (JEXL-294) expression:b == true , when b="abc" then return true
Date Thu, 28 Mar 2019 06:54:01 GMT

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

锁战强 commented on JEXL-294:
--------------------------

Thank you for your quick answer. Do I need to close this ?

> 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
>
> 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)

Mime
View raw message