Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B1EC39686 for ; Wed, 30 Nov 2011 17:12:14 +0000 (UTC) Received: (qmail 72476 invoked by uid 500); 30 Nov 2011 17:12:14 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 72389 invoked by uid 500); 30 Nov 2011 17:12:14 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 72381 invoked by uid 99); 30 Nov 2011 17:12:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2011 17:12:14 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2011 17:12:07 +0000 Received: from joe.nabble.com ([192.168.236.139]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1RVnhC-0007Yf-Ll for dev@commons.apache.org; Wed, 30 Nov 2011 09:11:46 -0800 Date: Wed, 30 Nov 2011 09:11:46 -0800 (PST) From: henrib To: dev@commons.apache.org Message-ID: <1322673106665-4123859.post@n4.nabble.com> In-Reply-To: References: <1322490914334-4115380.post@n4.nabble.com> <1322495712321-4115683.post@n4.nabble.com> <1322667248491-4123418.post@n4.nabble.com> Subject: Re: [JEXL] binary compatibility MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org About Was: Dear #{p} Doe; Now: Dear ${p} Doe; As stated, the issue was that preparing a deferred expression must always return an immediate (even composite) expression. When preparing "Dear #{p} ${name};" , the immediate ${name} will be evaluated - 'name' is the set of variables - and the preparation of the inner-deferred #{p} leads to another immediate ${p} thus the expression "Dear ${p} Doe; " - where the set of variables is 'p'. Since asString() must return the stringified form of the expression, it's pretty essential that this behavior remains as is which is correct. About JEXL-83 - which is an issue you reported - and its fix which lead to the JexlThreadedArithmetic, the behavior is documented in the Javadoc @ setLenient(): *

This method is not thread safe; it should be called as an optional step of the JexlEngine initialization code before expression creation & evaluation.

*

As of 2.1, you need a JexlThreadedArithmetic instance for this call to also modify the JexlArithmetic * leniency behavior.

The rationale is pretty well documented in the issue itself. I'd vote for throwing an UnsupportedOperationException with the same message (or log an error if silent?) and document the change explicitly in the release notes. -- View this message in context: http://apache-commons.680414.n4.nabble.com/JEXL-binary-compatibility-tp4114818p4123859.html Sent from the Commons - Dev mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org