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 2018/09/03 16:21:00 UTC
[jira] [Resolved] (JEXL-52) Implicit evaluation of misspelled EL
and ways to detect such occurrences
[ https://issues.apache.org/jira/browse/JEXL-52?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Henri Biestro resolved JEXL-52.
-------------------------------
Resolution: Won't Fix
After much consideration, besides its age (10 years!), it would not be an easy task; finding properties similar to a given name would require enumerating them, a feature that the current code line has no support for.
> Implicit evaluation of misspelled EL and ways to detect such occurrences
> ------------------------------------------------------------------------
>
> Key: JEXL-52
> URL: https://issues.apache.org/jira/browse/JEXL-52
> Project: Commons JEXL
> Issue Type: Improvement
> Affects Versions: 2.0.1
> Environment: commons jexl 1.1.1
> Reporter: madhav
> Assignee: Henri Biestro
> Priority: Major
> Fix For: Later
>
>
> I have a class called Athlete that has three boolean variables: ready, started and stopped.
> I created an instance of it with the name "obj" and created a JexlContext using it. I also registered a post JexlExprResolver with the Expression before calling evaluate() method on it.
> When I evaluate an incorrect EL "obj.statred" (method name is misspelled), evaluation calls my JexlExprResolver's evaluate() method. However when I change the EL to "!obj.statred", evaluation returns true.
> There are two issues here.
> 1. Returning true for an expression that cant be evaluated
> 2. Not calling any post resolvers.
> I'm using the above post resolver as a way of detecting misspelled ELs.
> But the support for such post resolver may go away in future versions. Can anybody suggest a better way?
> {code:title=Athlete.java|borderStyle=solid}
> public class Athlete {
> private boolean ready;
> private boolean started;
> public Athlete(boolean ready) {
> this.ready = ready;
> }
> public boolean isStarted() {
> return started;
> }
> public void setStarted(boolean started) {
> this.started = started;
> }
> public boolean isReady() {
> return ready;
> }
> public void setReady(boolean ready) {
> this.ready = ready;
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)