From agriffin@example.com Wed Oct 01 08:48:06 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 20032 invoked from network); 1 Oct 2008 08:48:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 08:48:06 -0000 Received: (qmail 41862 invoked by uid 500); 1 Oct 2008 08:48:05 -0000 Delivered-To: agriffin@example.com Received: (qmail 41848 invoked by uid 500); 1 Oct 2008 08:48:05 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 41837 invoked by uid 500); 1 Oct 2008 08:48:05 -0000 Delivered-To: agriffin@example.com Received: (qmail 41833 invoked by uid 99); 1 Oct 2008 08:48:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 01:48:04 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 08:47:10 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 768CF234C1F9 for <agriffin@example.com>; Wed, 1 Oct 2008 01:47:44 -0700 (PDT) Message-ID: <737-357-2585.1222850864484.JavaMail.jira@brutus> Date: Wed, 1 Oct 2008 01:47:44 -0700 (PDT) From: "Byron Foster (JIRA)" <agriffin@example.com> To: agriffin@example.com Subject: [jira] Created: (VELOCITY-620) Parse error creates an obscure error message MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Parse error creates an obscure error message -------------------------------------------- Key: VELOCITY-620 URL: https://issues.apache.org/jira/browse/VELOCITY-620 Project: Velocity Issue Type: Bug Components: Engine Affects Versions: 1.6 Reporter: Byron Foster The following incorrect velocity usage: #macro(foo $a) blaa #end #foo("b" "c") or ... #if ($x = "a") #end will create the obscure error message in the exception: > Bad Reference "null" in /foo.vm:18 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 13:08:06 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 69777 invoked from network); 1 Oct 2008 13:08:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 13:08:06 -0000 Received: (qmail 37925 invoked by uid 500); 1 Oct 2008 13:08:04 -0000 Delivered-To: agriffin@example.com Received: (qmail 37904 invoked by uid 500); 1 Oct 2008 13:08:04 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 37874 invoked by uid 500); 1 Oct 2008 13:08:03 -0000 Delivered-To: agriffin@example.com Received: (qmail 37868 invoked by uid 99); 1 Oct 2008 13:08:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 06:08:03 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 13:07:09 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 48904234C1F9 for <agriffin@example.com>; Wed, 1 Oct 2008 06:07:44 -0700 (PDT) Message-ID: <340511555.1222866464296.JavaMail.jira@brutus> Date: Wed, 1 Oct 2008 06:07:44 -0700 (PDT) From: "Byron Foster (JIRA)" <agriffin@example.com> To: agriffin@example.com Subject: [jira] Updated: (VELOCITY-618) Strict property and method references In-Reply-To: <1574672497.1222697444456.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Byron Foster updated VELOCITY-618: ---------------------------------- Attachment: strictPropertyAndVariable.patch strictPropertAndVariable.patch includes the changes of patch strictPropertyRef.patch and also enforces that variables must exist otherwise an exception is thrown. This is turned on using the same runtime.references.strict option. Internally variables may now be set with a NULL value, as in #(set = $null), and not just simply removed. This patch also fixes the issue of #if statements being ignored because one of the sides of the comparison is null, or non-existent. In the latter case bad references to variables or properties will throw an exception. In the former case nulls can be properly compared. > Strict property and method references > ------------------------------------- > > Key: VELOCITY-618 > URL: https://issues.apache.org/jira/browse/VELOCITY-618 > Project: Velocity > Issue Type: Improvement > Components: Engine > Reporter: Byron Foster > Attachments: strictPropertyAndVariable.patch, strictPropertyRef.patch > > > The given patch against trunk adds a new option 'runtime.references.strict'. When set to true, invalid property references will throw a InvalidMethodException. For example $foo.bar will throw an exception if the object contained in $foo has no such property as bar. Any kind of reference to bar will cause an exception including: > #if(#foo.bar) > #set($foo.bar = "junk") > #set($foo.getBar()) > etc... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 13:16:35 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 72684 invoked from network); 1 Oct 2008 13:16:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 13:16:35 -0000 Received: (qmail 49896 invoked by uid 500); 1 Oct 2008 13:16:33 -0000 Delivered-To: agriffin@example.com Received: (qmail 49749 invoked by uid 500); 1 Oct 2008 13:16:33 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 49738 invoked by uid 500); 1 Oct 2008 13:16:33 -0000 Delivered-To: agriffin@example.com Received: (qmail 49732 invoked by uid 99); 1 Oct 2008 13:16:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 06:16:33 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 13:15:39 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 3124D234C1F8 for <agriffin@example.com>; Wed, 1 Oct 2008 06:15:44 -0700 (PDT) Message-ID: <373932355.1222866944187.JavaMail.jira@brutus> Date: Wed, 1 Oct 2008 06:15:44 -0700 (PDT) From: "Byron Foster (JIRA)" <agriffin@example.com> To: agriffin@example.com Subject: [jira] Commented: (VELOCITY-619) New set modifier so that set only assigns a value when variable is not defined. In-Reply-To: <1082679808.1222699786934.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636020#action_12636020 ] Byron Foster commented on VELOCITY-619: --------------------------------------- The changes to the ProxyVMContext.java file in this patch will conflict with the same changes in the StrictPropertyAndVariable.patch in VELOCITY-619 but this is only because they contains the exact same change, and can be ignored. > New set modifier so that set only assigns a value when variable is not defined. > ------------------------------------------------------------------------------- > > Key: VELOCITY-619 > URL: https://issues.apache.org/jira/browse/VELOCITY-619 > Project: Velocity > Issue Type: Improvement > Components: Engine > Reporter: Byron Foster > Attachments: setBangModifier_2.patch > > > Define a new #set modifier such that a variable is only set if it is not defined, like so: > #set($!foo = "bar") > If the '!' character proceeds the variable foo, then $foo will be set with the value of "bar" ONLY IF $foo is not defined (is not in the context). Otherwise if $foo is defined it will remain unchanged. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 15:02:38 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 69719 invoked from network); 1 Oct 2008 15:02:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 15:02:38 -0000 Received: (qmail 16192 invoked by uid 500); 1 Oct 2008 15:02:36 -0000 Delivered-To: agriffin@example.com Received: (qmail 16167 invoked by uid 500); 1 Oct 2008 15:02:36 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 16156 invoked by uid 500); 1 Oct 2008 15:02:36 -0000 Delivered-To: agriffin@example.com Received: (qmail 16153 invoked by uid 99); 1 Oct 2008 15:02:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 08:02:36 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 15:01:40 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id B6DD5234C1F9 for <agriffin@example.com>; Wed, 1 Oct 2008 08:01:44 -0700 (PDT) Message-ID: <1608641727.1222873304747.JavaMail.jira@brutus> Date: Wed, 1 Oct 2008 08:01:44 -0700 (PDT) From: "Adrian Tarau (JIRA)" <agriffin@example.com> To: agriffin@example.com Subject: [jira] Commented: (VELOCITY-554) Velocity sources and javadocs missing in the maven repository In-Reply-To: <17940563.1181915426330.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636062#action_12636062 ] Adrian Tarau commented on VELOCITY-554: --------------------------------------- I've changed download.xml to add support for Maven Ant tasks and I have a few comments: 1. First of all current download process uses only download.jarname & download.jarversion to build the path in a Maven1 repository. It worked because groupId was the same as artifactId, but it is not right. I've changed, every download task needs groupdId, artifactId and version. Also added m1 in the download task names to differentiate them from the M2 download tasks. 2. I had do add additional tasks to download jars from Maven 2 repository. I just copied and modified the http-download(now http-m1-download). 3. Since Ant doesn't have build in something for string manipulation, a hierarchical groupId for M2 must be converted to a path. instead of <property name="download.groupId" value="org.apache.maven" /> you must put <property name="download.groupId" value="org/apache/maven" /> If this workaround is fine with you, we can let it like this if not we can use : http://ant-contrib.sourceforge.net/tasks/tasks/propertyregex.html Please let me know if the current changes are fine with you. > Velocity sources and javadocs missing in the maven repository > ------------------------------------------------------------- > > Key: VELOCITY-554 > URL: https://issues.apache.org/jira/browse/VELOCITY-554 > Project: Velocity > Issue Type: New Feature > Components: Build > Affects Versions: 1.5 > Reporter: Aliaksandr Radzivanovich > > It is really annoying when popular projects like Apache Velocity do not provide their sources and javadocs to the Maven repository. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 15:04:06 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 78171 invoked from network); 1 Oct 2008 15:04:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 15:04:06 -0000 Received: (qmail 20933 invoked by uid 500); 1 Oct 2008 15:04:04 -0000 Delivered-To: agriffin@example.com Received: (qmail 20919 invoked by uid 500); 1 Oct 2008 15:04:04 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 20908 invoked by uid 500); 1 Oct 2008 15:04:04 -0000 Delivered-To: agriffin@example.com Received: (qmail 20905 invoked by uid 99); 1 Oct 2008 15:04:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 08:04:04 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 15:03:10 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 48443234C1FA for <agriffin@example.com>; Wed, 1 Oct 2008 08:03:44 -0700 (PDT) Message-ID: <1369090970.1222873424294.JavaMail.jira@brutus> Date: Wed, 1 Oct 2008 08:03:44 -0700 (PDT) From: "Adrian Tarau (JIRA)" <agriffin@example.com> To: agriffin@example.com Subject: [jira] Updated: (VELOCITY-554) Velocity sources and javadocs missing in the maven repository In-Reply-To: <17940563.1181915426330.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-554?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Tarau updated VELOCITY-554: ---------------------------------- Attachment: VELOCITY-554_download.patch > Velocity sources and javadocs missing in the maven repository > ------------------------------------------------------------- > > Key: VELOCITY-554 > URL: https://issues.apache.org/jira/browse/VELOCITY-554 > Project: Velocity > Issue Type: New Feature > Components: Build > Affects Versions: 1.5 > Reporter: Aliaksandr Radzivanovich > Attachments: VELOCITY-554_download.patch > > > It is really annoying when popular projects like Apache Velocity do not provide their sources and javadocs to the Maven repository. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 17:04:14 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 93361 invoked from network); 1 Oct 2008 17:04:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 17:04:14 -0000 Received: (qmail 45049 invoked by uid 500); 1 Oct 2008 17:04:07 -0000 Delivered-To: agriffin@example.com Received: (qmail 45025 invoked by uid 500); 1 Oct 2008 17:04:07 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 44995 invoked by uid 500); 1 Oct 2008 17:04:07 -0000 Delivered-To: agriffin@example.com Received: (qmail 44963 invoked by uid 99); 1 Oct 2008 17:04:07 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 10:04:06 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 17:03:09 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 3D656234C1F8 for <agriffin@example.com>; Wed, 1 Oct 2008 10:03:44 -0700 (PDT) Message-ID: <737-357-2585.1222880624236.JavaMail.jira@brutus> Date: Wed, 1 Oct 2008 10:03:44 -0700 (PDT) From: "Petr Marhan (JIRA)" <agriffin@example.com> To: agriffin@example.com Subject: [jira] Commented: (VELOCITY-337) Need translations of new #{else} syntax documentation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636096#action_12636096 ] Petr Marhan commented on VELOCITY-337: -------------------------------------- There needs to be done some clarification in VTL reference It says: # [ { ] if [ } ] ( [condition] ) [output] [ # [ { ] elseif [ } ] ( [condition] ) [output] ]* [ # [ { ] else [ } ] [output] ] # [ { ] end [ } ] witch means that #if ($foo) output #{end} alternatively #{if} ($foo) output #end is correct. In fact it is NOT. > Need translations of new #{else} syntax documentation > ----------------------------------------------------- > > Key: VELOCITY-337 > URL: https://issues.apache.org/jira/browse/VELOCITY-337 > Project: Velocity > Issue Type: Improvement > Components: Documentation > Affects Versions: 1.5 > Environment: Operating System: Windows XP > Platform: PC > Reporter: Will Glass-Husain > > Need to update Spanish, Finnish, French versions of the user guide with the > new #{directive} syntax. > (also wouldn't hurt to check for consistency with other new items - use svn > diff). Here's the new English copy (from revision 125388) > Directives always begin with a #. Like references, the name of the directive > may be bracketed by a { and a } symbol. This is useful with directives that > are immediately followed by text. For example the following produces an error: > > #if($a==1)true enough#elseno way!#end > > In such a case, use the brackets to separate #else from the rest of the line. > > #if($a==1)true enough#{else}no way!#end -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 17:06:06 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 94957 invoked from network); 1 Oct 2008 17:06:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 17:06:06 -0000 Received: (qmail 49795 invoked by uid 500); 1 Oct 2008 17:06:04 -0000 Delivered-To: agriffin@example.com Received: (qmail 49777 invoked by uid 500); 1 Oct 2008 17:06:04 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 49765 invoked by uid 500); 1 Oct 2008 17:06:03 -0000 Delivered-To: agriffin@example.com Received: (qmail 49758 invoked by uid 99); 1 Oct 2008 17:06:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 10:06:03 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 17:05:10 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 3D018234C20F for <agriffin@example.com>; Wed, 1 Oct 2008 10:05:44 -0700 (PDT) Message-ID: <1319149901.1222880744248.JavaMail.jira@brutus> Date: Wed, 1 Oct 2008 10:05:44 -0700 (PDT) From: "Petr Marhan (JIRA)" <agriffin@example.com> To: agriffin@example.com Subject: [jira] Issue Comment Edited: (VELOCITY-337) Need translations of new #{else} syntax documentation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636096#action_12636096 ] marhan edited comment on VELOCITY-337 at 10/1/08 10:05 AM: ---------------------------------------------------------------- There needs to be done some clarification in VTL reference It says: # [ { ] if [ } ] ( [condition] ) [output] [ # [ { ] elseif [ } ] ( [condition] ) [output] ]* [ # [ { ] else [ } ] [output] ] # [ { ] end [ } ] witch means that #if ($foo) output #{end} alternatively #{if} ($foo) output #end is correct. In fact it is NOT. It behaves very similarly with #{elseif} in between #if and #end was (Author: marhan): There needs to be done some clarification in VTL reference It says: # [ { ] if [ } ] ( [condition] ) [output] [ # [ { ] elseif [ } ] ( [condition] ) [output] ]* [ # [ { ] else [ } ] [output] ] # [ { ] end [ } ] witch means that #if ($foo) output #{end} alternatively #{if} ($foo) output #end is correct. In fact it is NOT. > Need translations of new #{else} syntax documentation > ----------------------------------------------------- > > Key: VELOCITY-337 > URL: https://issues.apache.org/jira/browse/VELOCITY-337 > Project: Velocity > Issue Type: Improvement > Components: Documentation > Affects Versions: 1.5 > Environment: Operating System: Windows XP > Platform: PC > Reporter: Will Glass-Husain > > Need to update Spanish, Finnish, French versions of the user guide with the > new #{directive} syntax. > (also wouldn't hurt to check for consistency with other new items - use svn > diff). Here's the new English copy (from revision 125388) > Directives always begin with a #. Like references, the name of the directive > may be bracketed by a { and a } symbol. This is useful with directives that > are immediately followed by text. For example the following produces an error: > > #if($a==1)true enough#elseno way!#end > > In such a case, use the brackets to separate #else from the rest of the line. > > #if($a==1)true enough#{else}no way!#end -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 17:41:05 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 17550 invoked from network); 1 Oct 2008 17:41:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 17:41:05 -0000 Received: (qmail 96284 invoked by uid 500); 1 Oct 2008 17:41:03 -0000 Delivered-To: agriffin@example.com Received: (qmail 96266 invoked by uid 500); 1 Oct 2008 17:41:03 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 96255 invoked by uid 99); 1 Oct 2008 17:41:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 10:41:03 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of agriffin@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO outmail137063.authsmtp.net) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 17:40:00 +0000 Received: from mail-c188.authsmtp.com (mail-c188.authsmtp.com [83.161.120.155]) by punt4.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m91HeArb080538 for <agriffin@example.com>; Wed, 1 Oct 2008 18:40:10 +0100 (BST) Received: from base2.cc (ec2-75-101-141-241.compute-1.amazonaws.com [83.161.120.155]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id m91He83x065302 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for <agriffin@example.com>; Wed, 1 Oct 2008 18:40:09 +0100 (BST) Message-Id: <agriffin@example.com> From: Byron Foster <agriffin@example.com> To: agriffin@example.com Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Possible macro optimization Date: Wed, 1 Oct 2008 10:40:05 -0700 X-Mailer: Apple Mail (2.929.2) X-Server-Quench: fe0d117b-8fdf-11dd-aecc-001871e930f4 X-AuthRoute: OCdxZgkQAVZfXR4d DAsOBTRNE0MuLQtA DAErMwZeJ1EISRUX O15TJVpedloGSkcB Anl0CBBLUl1xUXN0 YwBVbQ9dawRJWhtr UElXQ1ZTCgdsAAMD AwEfHER7dn0TcH04 ZUBnXXBZEkV4cEIz FBtUQWwHYjV9YDZL Bl1ZdlcAbVIfLUxY alB+XHQMNGwEZixk CTc0JCswNzFSYCFc SRsKZVUKXUcOHyw1 WxEFG11z X-Authentic-SMTP: 61633236313532.cat.dmpriest.net.uk:1378/Kp X-Report-SPAM: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-Virus-Status: No virus detected - but ensure you scan with your own anti-virus system! X-Virus-Checked: Checked by ClamAV on apache.org I was considering the possibility that references within macros could be optimized. Given the following: #macro(foo $a $b) $a $b #end #foo($c $d.e) Currently both $a $b within the macro are referenced by AST. However, with some compile time analysis it can be determined that $a and $b can be referenced directly from the macro context (just like variables outside of a macro). The analysis can determine that $c and $d are not modified during the macro call by walking the AST tree and insuring these references do not exist within the macro. Not only could the AST be removed, but the value $d.e could be passed in to $b which would avoid looking up the 'e' property on $d every time $b is referenced. This would also save memory since the AST nodes for all the references in the macro could be removed. Anyone see a problem with this? --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 17:44:35 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 19325 invoked from network); 1 Oct 2008 17:44:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 17:44:35 -0000 Received: (qmail 296 invoked by uid 500); 1 Oct 2008 17:44:34 -0000 Delivered-To: agriffin@example.com Received: (qmail 151 invoked by uid 500); 1 Oct 2008 17:44:33 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 140 invoked by uid 500); 1 Oct 2008 17:44:33 -0000 Delivered-To: agriffin@example.com Received: (qmail 137 invoked by uid 99); 1 Oct 2008 17:44:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 10:44:33 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 17:43:39 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 38BF7234C1F8 for <agriffin@example.com>; Wed, 1 Oct 2008 10:43:44 -0700 (PDT) Message-ID: <965100175.1222883024217.JavaMail.jira@brutus> Date: Wed, 1 Oct 2008 10:43:44 -0700 (PDT) From: "Nathan Bubna (JIRA)" <agriffin@example.com> To: agriffin@example.com Subject: [jira] Commented: (VELOCITY-554) Velocity sources and javadocs missing in the maven repository In-Reply-To: <17940563.1181915426330.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-554?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636107#action_12636107 ] Nathan Bubna commented on VELOCITY-554: --------------------------------------- That's a great patch, Adrian. I've committed it. > Velocity sources and javadocs missing in the maven repository > ------------------------------------------------------------- > > Key: VELOCITY-554 > URL: https://issues.apache.org/jira/browse/VELOCITY-554 > Project: Velocity > Issue Type: New Feature > Components: Build > Affects Versions: 1.5 > Reporter: Aliaksandr Radzivanovich > Attachments: VELOCITY-554_download.patch > > > It is really annoying when popular projects like Apache Velocity do not provide their sources and javadocs to the Maven repository. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 19:32:27 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 94557 invoked from network); 1 Oct 2008 19:32:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 19:32:27 -0000 Received: (qmail 48337 invoked by uid 500); 1 Oct 2008 19:32:26 -0000 Delivered-To: agriffin@example.com Received: (qmail 48323 invoked by uid 500); 1 Oct 2008 19:32:26 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 48312 invoked by uid 99); 1 Oct 2008 19:32:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 12:32:26 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of agriffin@example.com designates 83.161.120.155 as permitted sender) Received: from [83.161.120.155] (HELO rn-out-0910.google.com) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 19:31:25 +0000 Received: by rn-out-0910.google.com with SMTP id v72so253289rnb.6 for <agriffin@example.com>; Wed, 01 Oct 2008 12:32:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=gMds/1cBKjMwWVRfzWw+J2ispdq4usIfgRYZOdWuwj8=; b=BsLE6DAJKf9KlQJHCezvtSwn4TSUPIpmWVcVHIhCYVkZA0asbNyRaG/I80kFY9QFPa mvlO07JMBKFw9ldZb2oA7W+AS4eFhly4eMMu2Ejt5UIUQhA+RZ8YuS3KHH1oAIHQe6Fu gso8ipVwB+4VWaSEPW/gGOEC+EqcoGsiELHUU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=dCLcGXaufz6VjDeOC+uvFcX7IPUrhdLdB87NuldpX9PiNZqRZu+XWztDkkxr6/xCZc foj+1Q3dl4AXR31aQ4UXYM3JDELniB3Q3CUbpGOQxHT2ovfVJvTWw25rQVdR6+jud+i9 bOE+uJUZh6iGgfLTQ0+lXCau1MMIIZaIYs/zo= Received: by 83.161.120.155 with SMTP id z16mr12600174ybn.117.1222889519974; Wed, 01 Oct 2008 12:31:59 -0700 (PDT) Received: by 83.161.120.155 with HTTP; Wed, 1 Oct 2008 12:31:59 -0700 (PDT) Message-ID: <agriffin@example.com> Date: Wed, 1 Oct 2008 12:31:59 -0700 From: "Nathan Bubna" <agriffin@example.com> To: "Velocity Developers List" <agriffin@example.com> Subject: Re: Possible macro optimization In-Reply-To: <agriffin@example.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <agriffin@example.com> X-Virus-Checked: Checked by ClamAV on apache.org On Wed, Oct 1, 2008 at 10:40 AM, Byron Foster <agriffin@example.com> wrote: > I was considering the possibility that references within macros could be > optimized. Given the following: > > #macro(foo $a $b) > $a $b > #end > > #foo($c $d.e) > > Currently both $a $b within the macro are referenced by AST. However, with > some compile time analysis it can be determined that $a and $b can be > referenced directly from the macro context (just like variables outside of a > macro). The analysis can determine that $c and $d are not modified during > the macro call by walking the AST tree and insuring these references do not > exist within the macro. interesting. any idea what sort of gains this effort would provide in your simple example? since this wouldn't be a simple optimization, it would be important to see how performance really changes in one or two cases. > Not only could the AST be removed, but the value > $d.e could be passed in to $b which would avoid looking up the 'e' property > on $d every time $b is referenced. This would also save memory since the > AST nodes for all the references in the macro could be removed. Anyone see > a problem with this? yeah, that would be a showstopper, as that would be pass by value, which is a drastic change. we can't verify that $d.e will always return the same value. you can't even cache the value returned by rendering $d, since the value returned by $d.toString() can change on subsequent calls. VelocityTools' Alternator relies upon this. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: agriffin@example.com > For additional commands, e-mail: agriffin@example.com > > --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 20:30:37 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 26732 invoked from network); 1 Oct 2008 20:30:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 20:30:37 -0000 Received: (qmail 13650 invoked by uid 500); 1 Oct 2008 20:30:36 -0000 Delivered-To: agriffin@example.com Received: (qmail 13510 invoked by uid 500); 1 Oct 2008 20:30:36 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 13498 invoked by uid 500); 1 Oct 2008 20:30:36 -0000 Delivered-To: agriffin@example.com Received: (qmail 13495 invoked by uid 99); 1 Oct 2008 20:30:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 13:30:36 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 20:29:39 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 44B9B234C1FA for <agriffin@example.com>; Wed, 1 Oct 2008 13:29:44 -0700 (PDT) Message-ID: <986044026.1222892984280.JavaMail.jira@brutus> Date: Wed, 1 Oct 2008 13:29:44 -0700 (PDT) From: "Nathan Bubna (JIRA)" <agriffin@example.com> To: agriffin@example.com Subject: [jira] Commented: (VELOCITY-337) Need translations of new #{else} syntax documentation MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-337?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636154#action_12636154 ] Nathan Bubna commented on VELOCITY-337: --------------------------------------- no, both of your examples are valid and work (just tested in 1.6-dev). > Need translations of new #{else} syntax documentation > ----------------------------------------------------- > > Key: VELOCITY-337 > URL: https://issues.apache.org/jira/browse/VELOCITY-337 > Project: Velocity > Issue Type: Improvement > Components: Documentation > Affects Versions: 1.5 > Environment: Operating System: Windows XP > Platform: PC > Reporter: Will Glass-Husain > > Need to update Spanish, Finnish, French versions of the user guide with the > new #{directive} syntax. > (also wouldn't hurt to check for consistency with other new items - use svn > diff). Here's the new English copy (from revision 125388) > Directives always begin with a #. Like references, the name of the directive > may be bracketed by a { and a } symbol. This is useful with directives that > are immediately followed by text. For example the following produces an error: > > #if($a==1)true enough#elseno way!#end > > In such a case, use the brackets to separate #else from the rest of the line. > > #if($a==1)true enough#{else}no way!#end -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 21:54:08 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 84387 invoked from network); 1 Oct 2008 21:54:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 21:54:08 -0000 Received: (qmail 39070 invoked by uid 500); 1 Oct 2008 21:54:05 -0000 Delivered-To: agriffin@example.com Received: (qmail 39053 invoked by uid 500); 1 Oct 2008 21:54:05 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 39035 invoked by uid 500); 1 Oct 2008 21:54:05 -0000 Delivered-To: agriffin@example.com Received: (qmail 39031 invoked by uid 99); 1 Oct 2008 21:54:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 14:54:05 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 21:53:09 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 71C7B234C210 for <agriffin@example.com>; Wed, 1 Oct 2008 14:53:44 -0700 (PDT) Message-ID: <1287991226.1222898024464.JavaMail.jira@brutus> Date: Wed, 1 Oct 2008 14:53:44 -0700 (PDT) From: "Nathan Bubna (JIRA)" <agriffin@example.com> To: agriffin@example.com Subject: [jira] Updated: (VELOCITY-620) Parse error creates an obscure error message In-Reply-To: <737-357-2585.1222850864484.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nathan Bubna updated VELOCITY-620: ---------------------------------- Attachment: Velocity620TestCase.java For the first of your examples, 1.6-dev (with the standard velocity.properties) works fine, and for the second, i get this helpful error: org.apache.velocity.exception.ParseErrorException: Encountered "=" at line 1, column 9 of #if ($x = "a") #end Was expecting one of: <RPAREN> ... "-" ... "+" ... "*" ... "/" ... "%" ... <LOGICAL_AND> ... <LOGICAL_OR> ... <LOGICAL_LT> ... <LOGICAL_LE> ... <LOGICAL_GT> ... <LOGICAL_GE> ... <LOGICAL_EQUALS> ... <LOGICAL_NOT_EQUALS> ... > Parse error creates an obscure error message > -------------------------------------------- > > Key: VELOCITY-620 > URL: https://issues.apache.org/jira/browse/VELOCITY-620 > Project: Velocity > Issue Type: Bug > Components: Engine > Affects Versions: 1.6 > Reporter: Byron Foster > Fix For: 1.6 > > Attachments: Velocity620TestCase.java > > > The following incorrect velocity usage: > #macro(foo $a) > blaa > #end > #foo("b" "c") > or ... > #if ($x = "a") > #end > will create the obscure error message in the exception: > > Bad Reference "null" in /foo.vm:18 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 21:54:09 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 84412 invoked from network); 1 Oct 2008 21:54:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 21:54:09 -0000 Received: (qmail 39108 invoked by uid 500); 1 Oct 2008 21:54:05 -0000 Delivered-To: agriffin@example.com Received: (qmail 39091 invoked by uid 500); 1 Oct 2008 21:54:05 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 39076 invoked by uid 500); 1 Oct 2008 21:54:05 -0000 Delivered-To: agriffin@example.com Received: (qmail 39071 invoked by uid 99); 1 Oct 2008 21:54:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 14:54:05 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 21:53:09 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 7AE85234C216 for <agriffin@example.com>; Wed, 1 Oct 2008 14:53:44 -0700 (PDT) Message-ID: <1856020627.1222898024502.JavaMail.jira@brutus> Date: Wed, 1 Oct 2008 14:53:44 -0700 (PDT) From: "Nathan Bubna (JIRA)" <agriffin@example.com> To: agriffin@example.com Subject: [jira] Resolved: (VELOCITY-620) Parse error creates an obscure error message In-Reply-To: <737-357-2585.1222850864484.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nathan Bubna resolved VELOCITY-620. ----------------------------------- Resolution: Cannot Reproduce Fix Version/s: 1.6 > Parse error creates an obscure error message > -------------------------------------------- > > Key: VELOCITY-620 > URL: https://issues.apache.org/jira/browse/VELOCITY-620 > Project: Velocity > Issue Type: Bug > Components: Engine > Affects Versions: 1.6 > Reporter: Byron Foster > Fix For: 1.6 > > Attachments: Velocity620TestCase.java > > > The following incorrect velocity usage: > #macro(foo $a) > blaa > #end > #foo("b" "c") > or ... > #if ($x = "a") > #end > will create the obscure error message in the exception: > > Bad Reference "null" in /foo.vm:18 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 21:56:05 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 86373 invoked from network); 1 Oct 2008 21:56:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 21:56:05 -0000 Received: (qmail 43178 invoked by uid 500); 1 Oct 2008 21:56:03 -0000 Delivered-To: agriffin@example.com Received: (qmail 43157 invoked by uid 500); 1 Oct 2008 21:56:03 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 43142 invoked by uid 500); 1 Oct 2008 21:56:03 -0000 Delivered-To: agriffin@example.com Received: (qmail 43137 invoked by uid 99); 1 Oct 2008 21:56:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 14:56:03 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 21:55:09 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 44516234C210 for <agriffin@example.com>; Wed, 1 Oct 2008 14:55:44 -0700 (PDT) Message-ID: <169967874.1222898144278.JavaMail.jira@brutus> Date: Wed, 1 Oct 2008 14:55:44 -0700 (PDT) From: "Nathan Bubna (JIRA)" <agriffin@example.com> To: agriffin@example.com Subject: [jira] Updated: (VELOCITY-620) Parse error creates an obscure error message In-Reply-To: <737-357-2585.1222850864484.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nathan Bubna updated VELOCITY-620: ---------------------------------- Attachment: Velocity620TestCase.java > Parse error creates an obscure error message > -------------------------------------------- > > Key: VELOCITY-620 > URL: https://issues.apache.org/jira/browse/VELOCITY-620 > Project: Velocity > Issue Type: Bug > Components: Engine > Affects Versions: 1.6 > Reporter: Byron Foster > Fix For: 1.6 > > Attachments: Velocity620TestCase.java > > > The following incorrect velocity usage: > #macro(foo $a) > blaa > #end > #foo("b" "c") > or ... > #if ($x = "a") > #end > will create the obscure error message in the exception: > > Bad Reference "null" in /foo.vm:18 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 21:56:35 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 87000 invoked from network); 1 Oct 2008 21:56:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 21:56:35 -0000 Received: (qmail 43798 invoked by uid 500); 1 Oct 2008 21:56:33 -0000 Delivered-To: agriffin@example.com Received: (qmail 43784 invoked by uid 500); 1 Oct 2008 21:56:33 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 43773 invoked by uid 500); 1 Oct 2008 21:56:33 -0000 Delivered-To: agriffin@example.com Received: (qmail 43770 invoked by uid 99); 1 Oct 2008 21:56:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 14:56:33 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 21:55:39 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 4096C234C1FB for <agriffin@example.com>; Wed, 1 Oct 2008 14:55:44 -0700 (PDT) Message-ID: <701391208.1222898144263.JavaMail.jira@brutus> Date: Wed, 1 Oct 2008 14:55:44 -0700 (PDT) From: "Nathan Bubna (JIRA)" <agriffin@example.com> To: agriffin@example.com Subject: [jira] Updated: (VELOCITY-620) Parse error creates an obscure error message In-Reply-To: <737-357-2585.1222850864484.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-620?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nathan Bubna updated VELOCITY-620: ---------------------------------- Attachment: (was: Velocity620TestCase.java) > Parse error creates an obscure error message > -------------------------------------------- > > Key: VELOCITY-620 > URL: https://issues.apache.org/jira/browse/VELOCITY-620 > Project: Velocity > Issue Type: Bug > Components: Engine > Affects Versions: 1.6 > Reporter: Byron Foster > Fix For: 1.6 > > Attachments: Velocity620TestCase.java > > > The following incorrect velocity usage: > #macro(foo $a) > blaa > #end > #foo("b" "c") > or ... > #if ($x = "a") > #end > will create the obscure error message in the exception: > > Bad Reference "null" in /foo.vm:18 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 22:23:35 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 3859 invoked from network); 1 Oct 2008 22:23:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 22:23:35 -0000 Received: (qmail 75718 invoked by uid 500); 1 Oct 2008 22:23:34 -0000 Delivered-To: agriffin@example.com Received: (qmail 75568 invoked by uid 500); 1 Oct 2008 22:23:33 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 75556 invoked by uid 500); 1 Oct 2008 22:23:33 -0000 Delivered-To: agriffin@example.com Received: (qmail 75553 invoked by uid 99); 1 Oct 2008 22:23:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 15:23:33 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 22:22:39 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 437DA234C1FA for <agriffin@example.com>; Wed, 1 Oct 2008 15:22:44 -0700 (PDT) Message-ID: <373166690.1222899764268.JavaMail.jira@brutus> Date: Wed, 1 Oct 2008 15:22:44 -0700 (PDT) From: "Nathan Bubna (JIRA)" <agriffin@example.com> To: agriffin@example.com Subject: [jira] Commented: (VELOCITY-618) Strict property and method references In-Reply-To: <1574672497.1222697444456.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636208#action_12636208 ] Nathan Bubna commented on VELOCITY-618: --------------------------------------- at first glance, i see two problems: - I recently fixed the "issue of #if statements being ignored because one of the sides of the comparison is null, or non-existent". This doesn't require a strict mode being enabled to allow it. So, the changes to ASTNENode and ASTEQNode are extraneous. :) - i don't see any reason to make uberInfo a public field in ASTReference Otherwise, it looks good. I can see people using this too, and i don't really have any problem with allowing null values to be kept/set in the context as long as it still passes the test suite. Speaking of which, would you be willing to create a test case for these changes/features? It would make it a lot easier for me to get these changes in and would help ensure no one breaks them in the future. > Strict property and method references > ------------------------------------- > > Key: VELOCITY-618 > URL: https://issues.apache.org/jira/browse/VELOCITY-618 > Project: Velocity > Issue Type: Improvement > Components: Engine > Reporter: Byron Foster > Attachments: strictPropertyAndVariable.patch, strictPropertyRef.patch > > > The given patch against trunk adds a new option 'runtime.references.strict'. When set to true, invalid property references will throw a InvalidMethodException. For example $foo.bar will throw an exception if the object contained in $foo has no such property as bar. Any kind of reference to bar will cause an exception including: > #if(#foo.bar) > #set($foo.bar = "junk") > #set($foo.getBar()) > etc... -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 22:33:37 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 11210 invoked from network); 1 Oct 2008 22:33:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 22:33:37 -0000 Received: (qmail 89437 invoked by uid 500); 1 Oct 2008 22:33:35 -0000 Delivered-To: agriffin@example.com Received: (qmail 89291 invoked by uid 500); 1 Oct 2008 22:33:35 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 89279 invoked by uid 500); 1 Oct 2008 22:33:34 -0000 Delivered-To: agriffin@example.com Received: (qmail 88660 invoked by uid 99); 1 Oct 2008 22:33:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 15:33:33 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 22:32:39 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 2A323234C1FA for <agriffin@example.com>; Wed, 1 Oct 2008 15:32:44 -0700 (PDT) Message-ID: <63759274.1222900364168.JavaMail.jira@brutus> Date: Wed, 1 Oct 2008 15:32:44 -0700 (PDT) From: "Nathan Bubna (JIRA)" <agriffin@example.com> To: agriffin@example.com Subject: [jira] Commented: (VELOCITY-619) New set modifier so that set only assigns a value when variable is not defined. In-Reply-To: <1082679808.1222699786934.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12636216#action_12636216 ] Nathan Bubna commented on VELOCITY-619: --------------------------------------- I have mixed feelings about this. First, there are some backwards compatibility concerns. Since #set( $!foo = 2 ) always worked (though the bang was meaningless), this could break things for people who unwittingly use(d) that syntax already. That's not a showstopper, as they had no good reason to do so, but we would have to make sure to highlight such a change in the changelog, log a debug message each time, and perhaps even make this configurable. Second, it feels odd to me that #set( $!foo = 2 ) should work, but not #set( $!foo.bar = 2 ). Your comments in the patch simply say "it makes no sense", but why not? It seems like it's more a matter of being tricky to implement the check for the value. I think if we were to do this, it would be best to be as consistent about it as possible. Anyone else have thoughts about this? > New set modifier so that set only assigns a value when variable is not defined. > ------------------------------------------------------------------------------- > > Key: VELOCITY-619 > URL: https://issues.apache.org/jira/browse/VELOCITY-619 > Project: Velocity > Issue Type: Improvement > Components: Engine > Reporter: Byron Foster > Attachments: setBangModifier_2.patch > > > Define a new #set modifier such that a variable is only set if it is not defined, like so: > #set($!foo = "bar") > If the '!' character proceeds the variable foo, then $foo will be set with the value of "bar" ONLY IF $foo is not defined (is not in the context). Otherwise if $foo is defined it will remain unchanged. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 22:39:16 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 16249 invoked from network); 1 Oct 2008 22:39:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 1 Oct 2008 22:39:16 -0000 Received: (qmail 96202 invoked by uid 500); 1 Oct 2008 22:39:14 -0000 Delivered-To: agriffin@example.com Received: (qmail 96187 invoked by uid 500); 1 Oct 2008 22:39:14 -0000 Mailing-List: contact agriffin@example.com; run by ezmlm Precedence: bulk List-Help: <mailto:agriffin@example.com> List-Unsubscribe: <mailto:agriffin@example.com> List-Post: <mailto:agriffin@example.com> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <agriffin@example.com> Delivered-To: mailing list agriffin@example.com Received: (qmail 96176 invoked by uid 500); 1 Oct 2008 22:39:14 -0000 Delivered-To: agriffin@example.com Received: (qmail 96173 invoked by uid 99); 1 Oct 2008 22:39:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 15:39:14 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 22:38:09 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 7FB9C234C213 for <agriffin@example.com>; Wed, 1 Oct 2008 15:38:44 -0700 (PDT) Message-ID: <1244374535.1222900724522.JavaMail.jira@brutus> Date: Wed, 1 Oct 2008 15:38:44 -0700 (PDT) From: "Nathan Bubna (JIRA)" <agriffin@example.com> To: agriffin@example.com Subject: [jira] Resolved: (VELOCITY-316) Workaround the lack of equality in CharSequence. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Nathan Bubna resolved VELOCITY-316. ----------------------------------- Resolution: Fixed Fix Version/s: (was: 2.0) 1.5 This is actually fixed already, since in 1.5 we started falling back to comparing the results of toString() when objects are not of the same type. > Workaround the lack of equality in CharSequence. > ------------------------------------------------ > > Key: VELOCITY-316 > URL: https://issues.apache.org/jira/browse/VELOCITY-316 > Project: Velocity > Issue Type: Improvement > Components: Engine > Affects Versions: 1.4 > Environment: Operating System: All > Platform: All > Reporter: ArtemGr > Priority: Minor > Fix For: 1.5 > > > CharSequence is a nice addition to the Java API, > helping to encapsulate implementation details > and allowing programmers to use StringBuffer, > mutable strings (such as > http://mg4j.dsi.unimi.it/docs/it/unimi/dsi/mg4j/util/MutableString.html ) > or even their custom classes directly > instead of costly process of converting everything into a String. > One of the remaining drawbacks of the CharSequence > is the lack of support for the Object#equals method. > Fortunately, in Velocity it can be easily fixed > in the ASTEQNode and ASTNENode classes. > Example of the fix is provided in the following patches. > --- org/apache/velocity/runtime/parser/node/original/ASTEQNode.java Wed Apr > 14 09:26:42 2004 > +++ org/apache/velocity/runtime/parser/node/ASTEQNode.java Thu Nov 11 14:21: > 03 2004 > @@ -101,6 +101,20 @@ > } > else > { > + > + /* > + * Comparison of CharSequence objects. > + */ > + if (left instanceof CharSequence && right instanceof CharSequence) > + { > + final CharSequence a = (CharSequence) left; > + final CharSequence b = (CharSequence) right; > + final int aLen = a.length(); final int bLen = b.length(); > + if( aLen != bLen ) return false; > + int n = aLen; while( 0 != n-- ) if( a.charAt( n ) != b.charAt( n ) > ) return false; > + return true; > + } > + > rsvc.error("Error in evaluation of == expression." > + " Both arguments must be of the same Class." > + " Currently left = " + left.getClass() + ", right = > " > --- org/apache/velocity/runtime/parser/node/original/ASTNENode.java Wed Apr > 14 09:26:42 2004 > +++ org/apache/velocity/runtime/parser/node/ASTNENode.java Thu Nov 11 14:22: > 04 2004 > @@ -74,6 +74,20 @@ > } > else > { > + > + /* > + * Comparison of CharSequence objects. > + */ > + if (left instanceof CharSequence && right instanceof CharSequence) > + { > + final CharSequence a = (CharSequence) left; > + final CharSequence b = (CharSequence) right; > + final int aLen = a.length(); final int bLen = b.length(); > + if( aLen != bLen ) return true; > + int n = aLen; while( 0 != n-- ) if( a.charAt( n ) != b.charAt( n ) > ) return true; > + return false; > + } > + > rsvc.error("Error in evaluation of != expression." > + " Both arguments must be of the same Class." > + " Currently left = " + left.getClass() + ", right = > " > The additional check should not have any performance impact, > since it is performed where the 'Both arguments must be of the same Class' > error was. > I really hope Velocity will incorporate at least that minimal > support for CharSequence, making Java environment > to be a lot friendlier to some of us. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: agriffin@example.com For additional commands, e-mail: agriffin@example.com From agriffin@example.com Wed Oct 01 22:41:35 2008 Return-Path: <agriffin@example.com> Delivered-To: agriffin@example.com Received: (qmail 18540 invoked from network); 1 Oct 2008 22:41:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155)
{'source': 'Apache Software Foundation Public Mail Archives'}