Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Jexl behaviour with dotted names is inconsistent
this.is.a.test=null - OK
this.is.not.a.test=null - gives an Exception:
javax.script.ScriptException: org.apache.commons.jexl.parser.ParseException: Encountered " "." ". "" at line 1, column 8.
Was expecting one of:
"||" ...
"or" ...
"?" ...
"?:" ...
"&&" ...
"and" ...
"|" ...
"^" ...
"&" ...
"==" ...
"eq" ...
"!=" ...
"ne" ...
"<" ...
"lt" ...
">" ...
"gt" ...
"<=" ...
"le" ...
">=" ...
"ge" ...
"+" ...
"-" ...
"*" ...
"/" ...
"div" ...
"%" ...
"mod" ...
";" ...
";" ...
";" ...
at org.apache.commons.jexl.scripting.JexlScriptEngine.eval(JexlScriptEngine.java:122)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:89)
at org.apache.commons.jexl.scripting.JexlScriptEngineTest.testDottedNames(JexlScriptEngineTest.java:95)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.runTest(TestSuite.java:230)
at junit.framework.TestSuite.run(TestSuite.java:225)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Perhaps this is intentional behaviour, in which case it would be helpful to document which keywords are forbidden in variable names.
Attachments
Attachments
Issue Links
- is related to
-
JEXL-43 Website overview does not mention method calls and new 2.0 features
- Closed