Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 66096 invoked from network); 1 Aug 2009 18:04:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Aug 2009 18:04:36 -0000 Received: (qmail 23532 invoked by uid 500); 1 Aug 2009 18:04:40 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 23432 invoked by uid 500); 1 Aug 2009 18:04:39 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 23422 invoked by uid 99); 1 Aug 2009 18:04:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Aug 2009 18:04:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Aug 2009 18:04:36 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D75AF234C04C for ; Sat, 1 Aug 2009 11:04:14 -0700 (PDT) Message-ID: <1401479862.1249149854881.JavaMail.jira@brutus> Date: Sat, 1 Aug 2009 11:04:14 -0700 (PDT) From: "Henri Biestro (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (JEXL-64) Inconsistent behaviour of dotted names In-Reply-To: <1285421031.1249145654803.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JEXL-64?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12737922#action_12737922 ] Henri Biestro commented on JEXL-64: ----------------------------------- It is the original syntax so this is the intended behavior. The list of alphabetic keywords is: or and eq ne lt gt le ge div mod not null true false new They are however usable in as property names using the 'square-bracket' syntax as in: "this.is.['not'].a.test" But using this syntax, the interpreter is more stringent and reports a JexlException 'object is null' . Not sure about the best fix option... 1/ Document, leave behavior as is ? 2/ Document, fix square-bracket syntax to be equivalent to the 'dotted' syntax ? 3/ Get rid of them (at least for operators)? 4/ Use entities when appropriate instead ? (< > ...) ? > Inconsistent behaviour of dotted names > -------------------------------------- > > Key: JEXL-64 > URL: https://issues.apache.org/jira/browse/JEXL-64 > Project: Commons JEXL > Issue Type: Bug > Reporter: Sebb > Fix For: 2.0 > > > 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. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.