<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-346</id>
	<title>Nabble - Velocity - Dev</title>
	<updated>2009-11-19T14:49:39Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Velocity---Dev-f346.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Velocity---Dev-f346.html" />
	<subtitle type="html"></subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26435536</id>
	<title>[jira] Created: (VELOCITY-745) Modify ClassMap.java to use getMethods() rather than get getDeclaredMethods()</title>
	<published>2009-11-19T14:49:39Z</published>
	<updated>2009-11-19T14:49:39Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">Modify ClassMap.java to use getMethods() rather than get getDeclaredMethods()
&lt;br&gt;-----------------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Key: VELOCITY-745
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-745&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-745&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Project: Velocity
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Issue Type: Improvement
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Components: Engine
&lt;br&gt;&amp;nbsp; &amp;nbsp; Affects Versions: 1.6.2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Environment: All
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: Steve O'Hara
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Priority: Minor
&lt;br&gt;&lt;br&gt;&lt;br&gt;The code that recurses up the super classes to find all public methods using getDeclaredMethods() is now redundant and can be replaced with a single call to getMethods() - this intrinsically provides all inherited public methods.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26435536&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26435536&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-745%29-Modify-ClassMap.java-to-use-getMethods%28%29-rather-than-get-getDeclaredMethods%28%29-tp26435536p26435536.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26431232</id>
	<title>[jira] Created: (VELOCITY-744) No more VM adding logs</title>
	<published>2009-11-19T10:11:39Z</published>
	<updated>2009-11-19T10:11:39Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">No more VM adding logs
&lt;br&gt;----------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Key: VELOCITY-744
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-744&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-744&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Project: Velocity
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Issue Type: Bug
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Components: Engine
&lt;br&gt;&amp;nbsp; &amp;nbsp; Affects Versions: 1.6.2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: Alexandre Garnier
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Priority: Minor
&lt;br&gt;&lt;br&gt;&lt;br&gt;org.apache.velocity.runtime.VelocimacroFactory.addVelocimacro(String, String, String[], String) add a log &amp;quot;added &amp;lt;VMName&amp;gt; : source = &amp;lt;VMBody&amp;gt;&amp;quot;
&lt;br&gt;The new 1.6 method org.apache.velocity.runtime.VelocimacroFactory.addVelocimacro(String, Node, String[], String) no more log this.
&lt;br&gt;&lt;br&gt;The first one is used by org.apache.velocity.runtime.RuntimeInstance.addVelocimacro(String, String, String[], String) which is now deprecated for org.apache.velocity.runtime.RuntimeInstance.addVelocimacro(String, Node, String[], String) which use the new VelocimacroFactory.addVelocimacro
&lt;br&gt;&lt;br&gt;This logs was usefull for debug.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431232&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26431232&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-744%29-No-more-VM-adding-logs-tp26431232p26431232.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26399588</id>
	<title>[jira] Created: (VELTOOLS-124) LoopTool fails to retrieve $loop.index, $loop.first etc for the last element in a collection.</title>
	<published>2009-11-17T15:14:39Z</published>
	<updated>2009-11-17T15:14:39Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">LoopTool fails to retrieve $loop.index, $loop.first etc for the last element in a collection.
&lt;br&gt;---------------------------------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Key: VELTOOLS-124
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELTOOLS-124&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELTOOLS-124&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Project: Velocity Tools
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Issue Type: Bug
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Components: GenericTools
&lt;br&gt;&amp;nbsp; &amp;nbsp; Affects Versions: 2.x
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Environment: velocity-tools-2.0-beta4 with velocity-1.6.2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: Sergiy Kovalchuk
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fix For: 2.x
&lt;br&gt;&lt;br&gt;&lt;br&gt;$loop.index, $loop.first and other LoopTool methods (that depend on iterator) return null for the last element in a collection.
&lt;br&gt;&lt;br&gt;Try to run:
&lt;br&gt;#set( $list = [1..3] )
&lt;br&gt;#foreach($i in $loop.watch($list))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;$i - ${loop.index},
&lt;br&gt;#end
&lt;br&gt;&lt;br&gt;The result is:
&lt;br&gt;i[0]=1; i[1]=2; i[${loop.index}]=3; 
&lt;br&gt;&lt;br&gt;I tried to investigate it a little, and seems like the problem is &amp;nbsp;inside &amp;nbsp;&amp;quot;cacheNext(boolean popWhenDone)&amp;quot;.
&lt;br&gt;&lt;br&gt;First it checks if (!iterator.hasNext()) and if not then removes this iterator from the stack. But later in this method it retrieves next element from a collection &amp;quot;this.next = iterator.next();&amp;quot;. Seems like it causes removing iterator too early, when calling ${loop.index} on the last element the iterator is already removed.
&lt;br&gt;&lt;br&gt;Thanks.
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26399588&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26399588&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELTOOLS-124%29-LoopTool-fails-to-retrieve-%24loop.index%2C-%24loop.first-etc-for-the-last-element-in-a-collection.-tp26399588p26399588.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26399589</id>
	<title>[jira] Updated: (VELTOOLS-124) LoopTool fails to retrieve $loop.index, $loop.first etc for the last element in a collection.</title>
	<published>2009-11-17T15:14:39Z</published>
	<updated>2009-11-17T15:14:39Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELTOOLS-124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELTOOLS-124?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Sergiy Kovalchuk updated VELTOOLS-124:
&lt;br&gt;--------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Description: 
&lt;br&gt;$loop.index, $loop.first and other LoopTool methods (that depend on iterator) return null for the last element in a collection.
&lt;br&gt;&lt;br&gt;Try to run:
&lt;br&gt;#set( $list = [1..3] )
&lt;br&gt;#foreach($i in $loop.watch($list))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i[${loop.index}]=$i;
&lt;br&gt;#end
&lt;br&gt;&lt;br&gt;The result is:
&lt;br&gt;i[0]=1; i[1]=2; i[${loop.index}]=3; 
&lt;br&gt;&lt;br&gt;I tried to investigate it a little, and seems like the problem is &amp;nbsp;inside &amp;nbsp;&amp;quot;cacheNext(boolean popWhenDone)&amp;quot;.
&lt;br&gt;&lt;br&gt;First it checks if (!iterator.hasNext()) and if not then removes this iterator from the stack. But later in this method it retrieves next element from a collection &amp;quot;this.next = iterator.next();&amp;quot;. Seems like it causes removing iterator too early, when calling ${loop.index} on the last element the iterator is already removed.
&lt;br&gt;&lt;br&gt;Thanks.
&lt;br&gt;&lt;br&gt;&amp;nbsp; was:
&lt;br&gt;$loop.index, $loop.first and other LoopTool methods (that depend on iterator) return null for the last element in a collection.
&lt;br&gt;&lt;br&gt;Try to run:
&lt;br&gt;#set( $list = [1..3] )
&lt;br&gt;#foreach($i in $loop.watch($list))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;$i - ${loop.index},
&lt;br&gt;#end
&lt;br&gt;&lt;br&gt;The result is:
&lt;br&gt;i[0]=1; i[1]=2; i[${loop.index}]=3; 
&lt;br&gt;&lt;br&gt;I tried to investigate it a little, and seems like the problem is &amp;nbsp;inside &amp;nbsp;&amp;quot;cacheNext(boolean popWhenDone)&amp;quot;.
&lt;br&gt;&lt;br&gt;First it checks if (!iterator.hasNext()) and if not then removes this iterator from the stack. But later in this method it retrieves next element from a collection &amp;quot;this.next = iterator.next();&amp;quot;. Seems like it causes removing iterator too early, when calling ${loop.index} on the last element the iterator is already removed.
&lt;br&gt;&lt;br&gt;Thanks.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; LoopTool fails to retrieve $loop.index, $loop.first etc for the last element in a collection.
&lt;br&gt;&amp;gt; ---------------------------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELTOOLS-124
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELTOOLS-124&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELTOOLS-124&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity Tools
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: GenericTools
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 2.x
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Environment: velocity-tools-2.0-beta4 with velocity-1.6.2
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Sergiy Kovalchuk
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 2.x
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; $loop.index, $loop.first and other LoopTool methods (that depend on iterator) return null for the last element in a collection.
&lt;br&gt;&amp;gt; Try to run:
&lt;br&gt;&amp;gt; #set( $list = [1..3] )
&lt;br&gt;&amp;gt; #foreach($i in $loop.watch($list))
&lt;br&gt;&amp;gt; 	i[${loop.index}]=$i;
&lt;br&gt;&amp;gt; #end
&lt;br&gt;&amp;gt; The result is:
&lt;br&gt;&amp;gt; i[0]=1; i[1]=2; i[${loop.index}]=3; 
&lt;br&gt;&amp;gt; I tried to investigate it a little, and seems like the problem is &amp;nbsp;inside &amp;nbsp;&amp;quot;cacheNext(boolean popWhenDone)&amp;quot;.
&lt;br&gt;&amp;gt; First it checks if (!iterator.hasNext()) and if not then removes this iterator from the stack. But later in this method it retrieves next element from a collection &amp;quot;this.next = iterator.next();&amp;quot;. Seems like it causes removing iterator too early, when calling ${loop.index} on the last element the iterator is already removed.
&lt;br&gt;&amp;gt; Thanks.
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26399589&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26399589&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELTOOLS-124%29-LoopTool-fails-to-retrieve-%24loop.index%2C-%24loop.first-etc-for-the-last-element-in-a-collection.-tp26399588p26399589.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26362932</id>
	<title>Re: [tools] Adding localization method to DateTool</title>
	<published>2009-11-15T12:24:12Z</published>
	<updated>2009-11-15T12:24:12Z</updated>
	<author>
		<name>Nathan Bubna</name>
	</author>
	<content type="html">On Sun, Nov 15, 2009 at 7:26 AM, Christopher Schultz
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26362932&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;chris@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Nathan,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Resurrecting this because I'm ready to commit.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 10/29/2009 3:04 PM, Nathan Bubna wrote:
&lt;br&gt;&amp;gt;&amp;gt; On Thu, Oct 29, 2009 at 8:06 AM, Christopher Schultz
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26362932&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;chris@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Nathan,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On 10/29/2009 11:02 AM, Christopher Schultz wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I like re-coding into SimpleDataFormat better.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; D'oh: that's not possible because DateFormat doesn't expose the pattern
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; it's using, so I'll have to return something unrelated. Hmm. I'm not a
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; big fan of NULL but it's also not exactly consistent with the API if an
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; error message is returned.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Any ideas other than NULL?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Not really, because a) it's unlikely to ever occur in practice and b)
&lt;br&gt;&amp;gt;&amp;gt; that's the traditional VelocityTools response to bad inputs.  If you
&lt;br&gt;&amp;gt;&amp;gt; call $date.toLocalizedPattern($invalidInput) then that's little better
&lt;br&gt;&amp;gt;&amp;gt; than $date.noSuchMethod($validinput).  Either way, part of the
&lt;br&gt;&amp;gt;&amp;gt; reference is invalid, and we want to render it as an invalid
&lt;br&gt;&amp;gt;&amp;gt; reference.  Returning null accomplishes that.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; While I agree that VelocityTools' traditional response to bad input is
&lt;br&gt;&amp;gt; null, the problem here isn't the user's bad input: instead, it's our
&lt;br&gt;&amp;gt; reliance on an unpublished but highly likely coincidence that DateFormat
&lt;br&gt;&amp;gt; always hands-out SimpleDateFormat objects.
&lt;/div&gt;&lt;br&gt;ah, but i didn't mean to imply that it is *just* the standard response
&lt;br&gt;to bad input. &amp;nbsp;it's the convention for all errors when attempting to
&lt;br&gt;execute a tool method. &amp;nbsp;it tells the user there's a problem in a
&lt;br&gt;consistent manner, responds to silent notation, is easily caught by an
&lt;br&gt;event handler, and properly blows up when VelocityEngine is running in
&lt;br&gt;the new strict mode. &amp;nbsp;returning an error string would be inconsistent
&lt;br&gt;and fail to draw the attention of other facilities for error
&lt;br&gt;checking/handling that Velocity provides.
&lt;br&gt;&lt;br&gt;&amp;gt; For patterns other than &amp;quot;simple_date&amp;quot; and stuff like that, I could
&lt;br&gt;&amp;gt; simply construct a new SimpleDateFormat object and use that, but then
&lt;br&gt;&amp;gt; the behavior of toLocalizedPattern would differ from the other methods
&lt;br&gt;&amp;gt; -- that is, &amp;quot;short_date&amp;quot; would work, except when it doesn't :(
&lt;br&gt;&lt;br&gt;yeah, but i think that's acceptable. &amp;nbsp;do the best we can, return null
&lt;br&gt;when nothing can be done.
&lt;br&gt;&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; -chris
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26362932&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26362932&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-tools--Adding-localization-method-to-DateTool-tp26102216p26362932.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26360086</id>
	<title>Re: [tools] Adding localization method to DateTool</title>
	<published>2009-11-15T07:26:32Z</published>
	<updated>2009-11-15T07:26:32Z</updated>
	<author>
		<name>Christopher Schultz-2</name>
	</author>
	<content type="html">Nathan,
&lt;br&gt;&lt;br&gt;Resurrecting this because I'm ready to commit.
&lt;br&gt;&lt;br&gt;On 10/29/2009 3:04 PM, Nathan Bubna wrote:
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Thu, Oct 29, 2009 at 8:06 AM, Christopher Schultz
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26360086&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;chris@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; Nathan,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On 10/29/2009 11:02 AM, Christopher Schultz wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I like re-coding into SimpleDataFormat better.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; D'oh: that's not possible because DateFormat doesn't expose the pattern
&lt;br&gt;&amp;gt;&amp;gt; it's using, so I'll have to return something unrelated. Hmm. I'm not a
&lt;br&gt;&amp;gt;&amp;gt; big fan of NULL but it's also not exactly consistent with the API if an
&lt;br&gt;&amp;gt;&amp;gt; error message is returned.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Any ideas other than NULL?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Not really, because a) it's unlikely to ever occur in practice and b)
&lt;br&gt;&amp;gt; that's the traditional VelocityTools response to bad inputs. &amp;nbsp;If you
&lt;br&gt;&amp;gt; call $date.toLocalizedPattern($invalidInput) then that's little better
&lt;br&gt;&amp;gt; than $date.noSuchMethod($validinput). &amp;nbsp;Either way, part of the
&lt;br&gt;&amp;gt; reference is invalid, and we want to render it as an invalid
&lt;br&gt;&amp;gt; reference. &amp;nbsp;Returning null accomplishes that.
&lt;/div&gt;&lt;/div&gt;While I agree that VelocityTools' traditional response to bad input is
&lt;br&gt;null, the problem here isn't the user's bad input: instead, it's our
&lt;br&gt;reliance on an unpublished but highly likely coincidence that DateFormat
&lt;br&gt;always hands-out SimpleDateFormat objects.
&lt;br&gt;&lt;br&gt;For patterns other than &amp;quot;simple_date&amp;quot; and stuff like that, I could
&lt;br&gt;simply construct a new SimpleDateFormat object and use that, but then
&lt;br&gt;the behavior of toLocalizedPattern would differ from the other methods
&lt;br&gt;-- that is, &amp;quot;short_date&amp;quot; would work, except when it doesn't :(
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;-chris
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (268 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26360086/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-tools--Adding-localization-method-to-DateTool-tp26102216p26360086.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26337560</id>
	<title>[jira] Updated: (VELOCITY-657) $velocityHasNext not working properly (returns true even if iterator does not have next value)</title>
	<published>2009-11-13T06:37:39Z</published>
	<updated>2009-11-13T06:37:39Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Michael Parmeley updated VELOCITY-657:
&lt;br&gt;--------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Comment: was deleted
&lt;br&gt;&lt;br&gt;(was: I am using velocity 1.6.2 and this is still occuring. Using $velocityHasNext does not work in nested loops.
&lt;br&gt;&lt;br&gt;For example:
&lt;br&gt;&lt;br&gt;I have: #foreach(${column} in ${columns})${column.columnName}#if(${velocityHasNext}),#end#end
&lt;br&gt;&lt;br&gt;However, if I have two columns named &amp;quot;foo&amp;quot; and &amp;quot;bar&amp;quot; this is resulting in &amp;quot;foobar&amp;quot;. If I change the condition in the if statment to something cheesy like (3 &amp;gt; 2) then the expected results of &amp;quot;foo,bar&amp;quot; is generated.
&lt;br&gt;&lt;br&gt;So the $velocityHasNext is still not working in velocity 1.6.2.
&lt;br&gt;&lt;br&gt;I have this property in my velocity.properties:
&lt;br&gt;&lt;br&gt;directive.foreach.iterator.name = velocityHasNext
&lt;br&gt;)
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; $velocityHasNext not working properly (returns true even if iterator does not have next value)
&lt;br&gt;&amp;gt; ----------------------------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-657
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-657&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-657&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Engine
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.6
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Dominik Marks
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Priority: Minor
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.6.2, 1.7
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: velocity-657-testcase.patch
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Using the new &amp;quot;velocityHasNext&amp;quot; feature in loops does not work as expected.
&lt;br&gt;&amp;gt; When using the following excerpt:
&lt;br&gt;&amp;gt; #foreach ($value in $element.values)
&lt;br&gt;&amp;gt; &amp;nbsp;$value 
&lt;br&gt;&amp;gt; &amp;nbsp;#if( $velocityHasNext )
&lt;br&gt;&amp;gt; &amp;nbsp; SEPARATOR
&lt;br&gt;&amp;gt; &amp;nbsp;#end
&lt;br&gt;&amp;gt; #end
&lt;br&gt;&amp;gt; and having $element.values as e.g. &amp;quot;test1&amp;quot;, &amp;quot;test2&amp;quot;, &amp;quot;test3&amp;quot;
&lt;br&gt;&amp;gt; I get
&lt;br&gt;&amp;gt; test1 SEPARATOR test2 SEPARATOR test3 SEPARATOR
&lt;br&gt;&amp;gt; but I would expect
&lt;br&gt;&amp;gt; test1 SEPARATOR test2 SEPARATOR test3
&lt;br&gt;&amp;gt; When looking into the source code, I see the following in org.apache.velocity.runtime.directive.Foreach.render():
&lt;br&gt;&amp;gt; while (!maxNbrLoopsExceeded &amp;&amp; i.hasNext())
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // TODO: JDK 1.5+ -&amp;gt; Integer.valueOf()
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; put(context, counterName , new Integer(counter));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; put(context, hasNextName, Boolean.valueOf(i.hasNext()));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Object value = i.next();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; put(context, elementKey, value);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; ....
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; Isn't this the wrong order of instructions?
&lt;br&gt;&amp;gt; I would expect:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Object value = i.next();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; put(context, hasNextName, Boolean.valueOf(i.hasNext()));
&lt;br&gt;&amp;gt; So that the $velocityHasNext variable will be filled with the &amp;quot;hasNext&amp;quot; of the follow-up iteration and not with the &amp;quot;hasNext&amp;quot; of the current iteration (which will always be true, otherwise the loop has finished before).
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26337560&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26337560&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-657%29-%24velocityHasNext-not-working-properly-%28returns-true-even-if-iterator-does-not-have-next-value%29-tp21144366p26337560.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26337529</id>
	<title>[jira] Commented: (VELOCITY-657) $velocityHasNext not working properly (returns true even if iterator does not have next value)</title>
	<published>2009-11-13T06:35:39Z</published>
	<updated>2009-11-13T06:35:39Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; [ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12777514#action_12777514&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12777514#action_12777514&lt;/a&gt;&amp;nbsp;] 
&lt;br&gt;&lt;br&gt;Michael Parmeley commented on VELOCITY-657:
&lt;br&gt;-------------------------------------------
&lt;br&gt;&lt;br&gt;I am using velocity 1.6.2 and this is still occuring. Using $velocityHasNext does not work in nested loops.
&lt;br&gt;&lt;br&gt;For example:
&lt;br&gt;&lt;br&gt;I have: #foreach(${column} in ${columns})${column.columnName}#if(${velocityHasNext}),#end#end
&lt;br&gt;&lt;br&gt;However, if I have two columns named &amp;quot;foo&amp;quot; and &amp;quot;bar&amp;quot; this is resulting in &amp;quot;foobar&amp;quot;. If I change the condition in the if statment to something cheesy like (3 &amp;gt; 2) then the expected results of &amp;quot;foo,bar&amp;quot; is generated.
&lt;br&gt;&lt;br&gt;So the $velocityHasNext is still not working in velocity 1.6.2.
&lt;br&gt;&lt;br&gt;I have this property in my velocity.properties:
&lt;br&gt;&lt;br&gt;directive.foreach.iterator.name = velocityHasNext
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; $velocityHasNext not working properly (returns true even if iterator does not have next value)
&lt;br&gt;&amp;gt; ----------------------------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-657
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-657&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-657&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Engine
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.6
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Dominik Marks
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Priority: Minor
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.6.2, 1.7
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: velocity-657-testcase.patch
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Using the new &amp;quot;velocityHasNext&amp;quot; feature in loops does not work as expected.
&lt;br&gt;&amp;gt; When using the following excerpt:
&lt;br&gt;&amp;gt; #foreach ($value in $element.values)
&lt;br&gt;&amp;gt; &amp;nbsp;$value 
&lt;br&gt;&amp;gt; &amp;nbsp;#if( $velocityHasNext )
&lt;br&gt;&amp;gt; &amp;nbsp; SEPARATOR
&lt;br&gt;&amp;gt; &amp;nbsp;#end
&lt;br&gt;&amp;gt; #end
&lt;br&gt;&amp;gt; and having $element.values as e.g. &amp;quot;test1&amp;quot;, &amp;quot;test2&amp;quot;, &amp;quot;test3&amp;quot;
&lt;br&gt;&amp;gt; I get
&lt;br&gt;&amp;gt; test1 SEPARATOR test2 SEPARATOR test3 SEPARATOR
&lt;br&gt;&amp;gt; but I would expect
&lt;br&gt;&amp;gt; test1 SEPARATOR test2 SEPARATOR test3
&lt;br&gt;&amp;gt; When looking into the source code, I see the following in org.apache.velocity.runtime.directive.Foreach.render():
&lt;br&gt;&amp;gt; while (!maxNbrLoopsExceeded &amp;&amp; i.hasNext())
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // TODO: JDK 1.5+ -&amp;gt; Integer.valueOf()
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; put(context, counterName , new Integer(counter));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; put(context, hasNextName, Boolean.valueOf(i.hasNext()));
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Object value = i.next();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; put(context, elementKey, value);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; ....
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; Isn't this the wrong order of instructions?
&lt;br&gt;&amp;gt; I would expect:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Object value = i.next();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; put(context, hasNextName, Boolean.valueOf(i.hasNext()));
&lt;br&gt;&amp;gt; So that the $velocityHasNext variable will be filled with the &amp;quot;hasNext&amp;quot; of the follow-up iteration and not with the &amp;quot;hasNext&amp;quot; of the current iteration (which will always be true, otherwise the loop has finished before).
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26337529&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26337529&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-657%29-%24velocityHasNext-not-working-properly-%28returns-true-even-if-iterator-does-not-have-next-value%29-tp21144366p26337529.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26335016</id>
	<title>[jira] Created: (DBF-11) Update libraries version (FOP)</title>
	<published>2009-11-13T03:12:39Z</published>
	<updated>2009-11-13T03:12:39Z</updated>
	<author>
		<name>JIRA jira@apache.org</name>
	</author>
	<content type="html">Update libraries version (FOP)
&lt;br&gt;------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Key: DBF-11
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/DBF-11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/DBF-11&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Project: DocBook Framework
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Issue Type: Bug
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: Alessandro Ruzzon
&lt;br&gt;&lt;br&gt;&lt;br&gt;Can you create a binary version that could work with version 0.95 of Apache FOP? There is a bug when you try to insert a rotated image (in which height is more than width), so I need to solve it. It seems it's a bug of FOP, and actually the version supported is 0.20.5.
&lt;br&gt;&lt;br&gt;Thanks all
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26335016&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26335016&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28DBF-11%29-Update-libraries-version-%28FOP%29-tp26335016p26335016.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26325381</id>
	<title>[Velocity Wiki] Update of &quot;BoardReport-November2009&quot; by HenningSchmiedehausen</title>
	<published>2009-11-12T12:01:03Z</published>
	<updated>2009-11-12T12:01:03Z</updated>
	<author>
		<name>Apache Wiki</name>
	</author>
	<content type="html">Dear Wiki user,
&lt;br&gt;&lt;br&gt;You have subscribed to a wiki page or wiki category on &amp;quot;Velocity Wiki&amp;quot; for change notification.
&lt;br&gt;&lt;br&gt;The &amp;quot;BoardReport-November2009&amp;quot; page has been changed by HenningSchmiedehausen.
&lt;br&gt;&lt;a href=&quot;http://wiki.apache.org/velocity/BoardReport-November2009&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.apache.org/velocity/BoardReport-November2009&lt;/a&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------
&lt;br&gt;&lt;br&gt;New page:
&lt;br&gt;== November 2009 Board Report ==
&lt;br&gt;&lt;br&gt;=== Status ===
&lt;br&gt;&lt;br&gt;Velocity still continues it quiet, steady flow. Activity picked up a little in October with some messages on the dev list. The user lists continues to be very self-helping with questions getting answered by members of the user and dev communities.
&lt;br&gt;&lt;br&gt;Velocity changed its chair from Will Glass-Husain to Henning Schmiedehausen.
&lt;br&gt;&lt;br&gt;The Velocity project currently has no board-level issues at this time.
&lt;br&gt;&lt;br&gt;There were new committers or PMC members voted in since the last board meeting.
&lt;br&gt;&lt;br&gt;No beta or final releases were made since the last board report.
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26325381&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26325381&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-Velocity-Wiki--Update-of-%22BoardReport-November2009%22-by-HenningSchmiedehausen-tp26325381p26325381.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26323920</id>
	<title>[Velocity Wiki] Update of &quot;ASFBoardReports&quot; by HenningSchmiedehausen</title>
	<published>2009-11-12T10:30:47Z</published>
	<updated>2009-11-12T10:30:47Z</updated>
	<author>
		<name>Apache Wiki</name>
	</author>
	<content type="html">Dear Wiki user,
&lt;br&gt;&lt;br&gt;You have subscribed to a wiki page or wiki category on &amp;quot;Velocity Wiki&amp;quot; for change notification.
&lt;br&gt;&lt;br&gt;The &amp;quot;ASFBoardReports&amp;quot; page has been changed by HenningSchmiedehausen.
&lt;br&gt;&lt;a href=&quot;http://wiki.apache.org/velocity/ASFBoardReports?action=diff&amp;rev1=1&amp;rev2=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://wiki.apache.org/velocity/ASFBoardReports?action=diff&amp;rev1=1&amp;rev2=2&lt;/a&gt;&lt;br&gt;&lt;br&gt;--------------------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;* [[BoardReport-February2009]]
&lt;br&gt;&amp;nbsp; &amp;nbsp;* [[BoardReport-May2009]]
&lt;br&gt;&amp;nbsp; &amp;nbsp;* [[BoardReport-October2009]]
&lt;br&gt;+ &amp;nbsp;* [[BoardReport-November2009]]
&lt;br&gt;&amp;nbsp; 
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26323920&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26323920&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-Velocity-Wiki--Update-of-%22ASFBoardReports%22-by-HenningSchmiedehausen-tp26323920p26323920.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26271999</id>
	<title>[jira] Updated: (VELOCITY-743) The character  &quot;:&quot; if present within the curly braces of a variable throws exception</title>
	<published>2009-11-09T11:11:32Z</published>
	<updated>2009-11-09T11:11:32Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-743?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Nathan Bubna updated VELOCITY-743:
&lt;br&gt;----------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Component/s: Engine
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Priority: Minor &amp;nbsp;(was: Major)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Improvement &amp;nbsp;(was: Bug)
&lt;br&gt;&lt;br&gt;Sorry, this is intentional. &amp;nbsp;The colon is not a supported character in references. &amp;nbsp; It will certainly never be considered a valid reference character for standard $reference notation.
&lt;br&gt;&lt;br&gt;I'll leave this open as an RFE though, since i suppose it would be possible to increase the scope of legal reference characters in formal ${reference} notation.
&lt;br&gt;&lt;br&gt;For now, your best bet is probably to add the context to itself:
&lt;br&gt;&lt;br&gt;context.put(&amp;quot;ctx&amp;quot;, context);
&lt;br&gt;&lt;br&gt;and then do $ctx.get(&amp;quot;EPL_JOBTITLE:varB_EPL&amp;quot;) to give yourself more character freedom.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; The character &amp;nbsp;&amp;quot;:&amp;quot; if present within the curly braces of a variable throws exception
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-743
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-743&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-743&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Improvement
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Engine
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.6.2
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Environment: JRE 6, Apache tomcat 6.0.18
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Vinay
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Priority: Minor
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am trying to write a template that is customized like this
&lt;br&gt;&amp;gt; -----------------------------------------------------------------------------
&lt;br&gt;&amp;gt; &amp;lt;hi&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;variable1&amp;gt; ${EPL_JOBTITLE:varB_EPL} &amp;lt;/variable1&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;variable2&amp;gt;${SPL_EMPLOYEENUMBER:varA_SPL} &amp;lt;/variable2&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/hi&amp;gt;
&lt;br&gt;&amp;gt; -----------------------------------------------------------------------------
&lt;br&gt;&amp;gt; Now the ${EPL_JOBTITLE:varB_EPL} is custom parsed and replaced with the appropriate values in the context.
&lt;br&gt;&amp;gt; However, as soon as the Template is loaded by the velocity engine I get a 
&lt;br&gt;&amp;gt; Template Parse Exception : 
&lt;br&gt;&amp;gt; Encountered &amp;quot;:varB_EPL}\r\n\r\n\r\n&amp;quot; at MY Script - 1\Test this.vm[line 1, column 15]
&lt;br&gt;&amp;gt; Was expecting one of:
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;quot;}&amp;quot; ...
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;DOT&amp;gt; ...
&lt;br&gt;&amp;gt; How is the &amp;quot;:&amp;quot; character an invalid one within braces ? Shouldn't it be supported within a variable name?
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271999&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271999&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-743%29-The-character--%22%3A%22-if-present-within-the-curly-braces-of-a-variable-throws-exception-tp26271776p26271999.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26271776</id>
	<title>[jira] Created: (VELOCITY-743) The character  &quot;:&quot; if present within the curly braces of a variable throws exception</title>
	<published>2009-11-09T10:57:32Z</published>
	<updated>2009-11-09T10:57:32Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">The character &amp;nbsp;&amp;quot;:&amp;quot; if present within the curly braces of a variable throws exception
&lt;br&gt;------------------------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Key: VELOCITY-743
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-743&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-743&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Project: Velocity
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Issue Type: Bug
&lt;br&gt;&amp;nbsp; &amp;nbsp; Affects Versions: 1.6.2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Environment: JRE 6, Apache tomcat 6.0.18
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: Vinay
&lt;br&gt;&lt;br&gt;&lt;br&gt;I am trying to write a template that is customized like this
&lt;br&gt;-----------------------------------------------------------------------------
&lt;br&gt;&amp;lt;hi&amp;gt;
&lt;br&gt;&amp;lt;variable1&amp;gt; ${EPL_JOBTITLE:varB_EPL} &amp;lt;/variable1&amp;gt;
&lt;br&gt;&amp;lt;variable2&amp;gt;${SPL_EMPLOYEENUMBER:varA_SPL} &amp;lt;/variable2&amp;gt;
&lt;br&gt;&amp;lt;/hi&amp;gt;
&lt;br&gt;-----------------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;Now the ${EPL_JOBTITLE:varB_EPL} is custom parsed and replaced with the appropriate values in the context.
&lt;br&gt;However, as soon as the Template is loaded by the velocity engine I get a 
&lt;br&gt;&lt;br&gt;Template Parse Exception : 
&lt;br&gt;Encountered &amp;quot;:varB_EPL}\r\n\r\n\r\n&amp;quot; at MY Script - 1\Test this.vm[line 1, column 15]
&lt;br&gt;Was expecting one of:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;quot;}&amp;quot; ...
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;lt;DOT&amp;gt; ...
&lt;br&gt;&lt;br&gt;&lt;br&gt;How is the &amp;quot;:&amp;quot; character an invalid one within braces ? Shouldn't it be supported within a variable name?
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271776&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26271776&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-743%29-The-character--%22%3A%22-if-present-within-the-curly-braces-of-a-variable-throws-exception-tp26271776p26271776.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26232752</id>
	<title>[jira] Created: (VELOCITY-742) Easily Add/Remove/Replace Directives Without Cracking Open Velocity Jar</title>
	<published>2009-11-06T06:20:32Z</published>
	<updated>2009-11-06T06:20:32Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">Easily Add/Remove/Replace Directives Without Cracking Open Velocity Jar
&lt;br&gt;-----------------------------------------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Key: VELOCITY-742
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-742&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-742&lt;/a&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Project: Velocity
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Issue Type: New Feature
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Components: Engine
&lt;br&gt;&amp;nbsp; &amp;nbsp; Affects Versions: 1.6.2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Reporter: Tim White
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Priority: Minor
&lt;br&gt;&lt;br&gt;&lt;br&gt;There are two use cases that I have for this issue:
&lt;br&gt;&lt;br&gt;1) We need to turn off #include in order to parse .html files that include SSI directives: &amp;nbsp;&amp;lt;!--#include virtual=&amp;quot;&amp;quot;--&amp;gt; &amp;nbsp;(we always use #parse in our world, so no loss for #include going away)
&lt;br&gt;&lt;br&gt;2) We need to supply our own version of #parse that contains the development hooks that I described in a different issue.
&lt;br&gt;&lt;br&gt;Right now, the only crisp way to do is is to crack open the velocity .jar and make these changes, which is very risky, because future developers may upgrade to new versions of Velocity and not realize that there are customizations and/or not understand how to remake them....not to mention in a shared-classpath environment, we don't always have control over which copy of the Velocity .jar we're using.
&lt;br&gt;&lt;br&gt;Ideally, there would be config options like this:
&lt;br&gt;&lt;br&gt;directive_remove (&amp;quot;#parse&amp;quot;, &amp;quot;#include&amp;quot;)
&lt;br&gt;directive_add (&amp;quot;#parse&amp;quot;, &amp;quot;com.qwest.velocity.directives.Parse&amp;quot;)
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;Tim
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26232752&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26232752&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-742%29-Easily-Add-Remove-Replace-Directives-Without-Cracking-Open-Velocity-Jar-tp26232752p26232752.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26196725</id>
	<title>[jira] Commented: (VELOCITY-736) Introspection regression from 1.5 to 1.6.2</title>
	<published>2009-11-04T05:57:32Z</published>
	<updated>2009-11-04T05:57:32Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; [ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12773486#action_12773486&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12773486#action_12773486&lt;/a&gt;&amp;nbsp;] 
&lt;br&gt;&lt;br&gt;David Esposito commented on VELOCITY-736:
&lt;br&gt;-----------------------------------------
&lt;br&gt;&lt;br&gt;Hi Guys,
&lt;br&gt;&lt;br&gt;I was hoping for a resolution one way or the other on this. If it's not going to be &amp;quot;fixed&amp;quot;, I will need to work around it ... If it is, when could I expect the fix to be included?
&lt;br&gt;&lt;br&gt;Nathan, addressing the detail of &amp;quot;public methods declared in public classes&amp;quot; ... Why isn't it as simple as &amp;quot;public methods&amp;quot;? .. Why does the protection of the class have any relevance? From an end-user perspective, I would expect that I can invoke any 'getter' that I can from my Java code regardless of the inheritance scheme of the class ... In this case, I have the Javadocs and source code of the Commons-Fileupload classes to understand what the developers intended, but if it's a closed source library I'm using, I would have to decompile the binaries to figure out why my methods aren't being invoke from VTL.
&lt;br&gt;&lt;br&gt;-Dave
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Introspection regression from 1.5 to 1.6.2
&lt;br&gt;&amp;gt; ------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-736
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-736&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-736&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Engine
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.6.2
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Environment: Sun JDK 1.6.0_16
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: David Esposito
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: Velocity736TestCase.java
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; When upgrading from Velcocity 1.5 to 1.6.2, the following snippet of code changed behavior. 
&lt;br&gt;&amp;gt; In Velocity 1.5, the output was:
&lt;br&gt;&amp;gt; The file upload exceeded 100
&lt;br&gt;&amp;gt; In Velocity 1.6.2, the output is:
&lt;br&gt;&amp;gt; The file upload exceeded $ex.permittedSize
&lt;br&gt;&amp;gt; There is nothing in the velocity log file to help me identify why it's not resolving 'permittedSize' to the correct bean method.
&lt;br&gt;&amp;gt; Here is a test program to replicate the problem. The context variable in question is the Commons FileUpload exception class documented here:
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://commons.apache.org/fileupload/apidocs/org/apache/commons/fileupload/FileUploadBase.SizeLimitExceededException.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://commons.apache.org/fileupload/apidocs/org/apache/commons/fileupload/FileUploadBase.SizeLimitExceededException.html&lt;/a&gt;&lt;br&gt;&amp;gt; I am using commons-fileupload-1.2.jar
&lt;br&gt;&amp;gt; import java.io.StringWriter;
&lt;br&gt;&amp;gt; import org.apache.commons.fileupload.FileUploadBase;
&lt;br&gt;&amp;gt; import org.apache.velocity.VelocityContext;
&lt;br&gt;&amp;gt; import org.apache.velocity.app.VelocityEngine;
&lt;br&gt;&amp;gt; import org.apache.velocity.context.Context;
&lt;br&gt;&amp;gt; public class Main {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; public static void main(String[] args) throws Exception{
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VelocityEngine e = new VelocityEngine();
&lt;br&gt;&amp;gt; 		String testTemplate = &amp;quot;The file upload exceeded $ex.permittedSize&amp;quot;;
&lt;br&gt;&amp;gt; 		StringWriter out = new StringWriter();
&lt;br&gt;&amp;gt; 		Context ctx = new VelocityContext();
&lt;br&gt;&amp;gt; 		FileUploadBase.FileSizeLimitExceededException ex = new FileUploadBase.FileSizeLimitExceededException(&amp;quot;too big!&amp;quot;, 50, 100);
&lt;br&gt;&amp;gt; 		ctx.put(&amp;quot;ex&amp;quot;,ex);
&lt;br&gt;&amp;gt; 		e.evaluate(ctx, out, &amp;quot;Tester&amp;quot;, testTemplate);
&lt;br&gt;&amp;gt; 		System.out.println(out.toString());
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;gt; }
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26196725&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26196725&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-736%29-Introspection-regression-from-1.5-to-1.6.2-tp25786030p26196725.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26190026</id>
	<title>[jira] Commented: (VELOCITY-715) Leaked object in FileResourceLoader#templatePaths</title>
	<published>2009-11-03T18:13:32Z</published>
	<updated>2009-11-03T18:13:32Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; [ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12773349#action_12773349&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12773349#action_12773349&lt;/a&gt;&amp;nbsp;] 
&lt;br&gt;&lt;br&gt;Byron Foster commented on VELOCITY-715:
&lt;br&gt;---------------------------------------
&lt;br&gt;&lt;br&gt;The WeakHashMap will correctly drop the value when the key is gargage collected, but as your link points out the WeakHashMap is not a cache. &amp;nbsp;JVM behavior will differ, but in general key/value pairs will be dropped for every garbage sweep, which mean allot of rebuilding of templates. &amp;nbsp;Also, as you point out, this is only an issue with many 10s of thousands of file names... &amp;nbsp;I can't imagine a use case where this is a practical concern.
&lt;br&gt;&lt;br&gt;I don't see a bug here..
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Leaked object in FileResourceLoader#templatePaths
&lt;br&gt;&amp;gt; -------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-715
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-715&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-715&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Engine
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Atsushi Isobe
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Priority: Minor
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: FileResourceLoader.patch, FileResourceLoaderLeakedObjectTest.java
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;org.apache.velocity.runtime.resource.loader.FileResourceLoader#templatePaths has stored templatename and real file path permanently.So if VelocityEngine#getTemplate(String) has called by too many files, #templatePaths have been enlarged. 
&lt;br&gt;&amp;gt; Bellow my test results.
&lt;br&gt;&amp;gt; ----------------------------------------
&lt;br&gt;&amp;gt; 2009-05-08 19:16:54,571 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 000,000 total: 002,696,488
&lt;br&gt;&amp;gt; 2009-05-08 19:19:23,381 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 065,536 total: 014,689,896
&lt;br&gt;&amp;gt; 2009-05-08 19:22:03,782 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 131,072 total: 025,374,944
&lt;br&gt;&amp;gt; 2009-05-08 19:24:14,756 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 196,608 total: 036,282,696
&lt;br&gt;&amp;gt; 2009-05-08 19:26:37,864 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 262,144 total: 046,776,168
&lt;br&gt;&amp;gt; 2009-05-08 19:28:55,090 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 327,680 total: 057,119,560
&lt;br&gt;&amp;gt; 2009-05-08 19:31:37,524 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 393,216 total: 069,858,824
&lt;br&gt;&amp;gt; 2009-05-08 19:34:10,425 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 458,752 total: 080,019,920
&lt;br&gt;&amp;gt; 2009-05-08 19:36:52,788 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 524,288 total: 090,093,168
&lt;br&gt;&amp;gt; 2009-05-08 19:39:13,662 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 589,824 total: 097,385,776
&lt;br&gt;&amp;gt; 2009-05-08 19:41:54,621 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 655,360 total: 107,387,792
&lt;br&gt;&amp;gt; 2009-05-08 19:44:31,601 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 720,896 total: 117,451,912
&lt;br&gt;&amp;gt; 2009-05-08 19:47:08,890 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 786,432 total: 137,151,792
&lt;br&gt;&amp;gt; 2009-05-08 19:49:44,924 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 851,968 total: 147,277,856
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26190026&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26190026&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-715%29-Leaked-object-in-FileResourceLoader-templatePaths-tp23444710p26190026.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26175113</id>
	<title>[jira] Resolved: (VELOCITY-740) InvalidReferenceEventHandler should get indication that a reference is quiet</title>
	<published>2009-11-02T21:33:59Z</published>
	<updated>2009-11-02T21:33:59Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Will Glass-Husain resolved VELOCITY-740.
&lt;br&gt;----------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Resolution: Fixed
&lt;br&gt;&lt;br&gt;Done. &amp;nbsp;Now passes $!foo instead of $foo to InvalidReferenceHandler upon hitting an invalid silent reference.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; InvalidReferenceEventHandler should get indication that a reference is quiet
&lt;br&gt;&amp;gt; ----------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-740
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-740&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-740&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Improvement
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Engine
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.6.2
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Will Glass-Husain
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.7
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Right now the InvalidReferenceEventHandler is called for bad references whether they are quiet or not. &amp;nbsp;The reference is passed as &amp;quot;$abc&amp;quot; even if the template actually contains &amp;quot;$!abc&amp;quot;.
&lt;br&gt;&amp;gt; Typically, you'd want to ignore invalid references. &amp;nbsp;We should fix this to pass &amp;quot;$!abc&amp;quot; instead of $abc.
&lt;br&gt;&amp;gt; It's not a hard fix -- anyone mind if I change this? &amp;nbsp;Technically, it's a break in backwards compatibility but a pretty minor one. &amp;nbsp;It will still get called but with an indication the reference is quiet.
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26175113&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26175113&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-740%29-InvalidReferenceEventHandler-should-get-indication-that-a-reference-is-quiet-tp25929140p26175113.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26174381</id>
	<title>[jira] Resolved: (VELOCITY-586) Add debugging hooks to #parse</title>
	<published>2009-11-02T19:09:59Z</published>
	<updated>2009-11-02T19:09:59Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Will Glass-Husain resolved VELOCITY-586.
&lt;br&gt;----------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Resolution: Won't Fix
&lt;br&gt;&lt;br&gt;Thanks for sharing this.
&lt;br&gt;&lt;br&gt;Going to resolve this issue - I think we don't want to mix HTTP and #parse. But it's a good custom directive if you need it.
&lt;br&gt;&lt;br&gt;An alternate way of doing this is to use IncludeEventHandler to redirect to a &amp;quot;wrapper&amp;quot; page which includes this kind of info. &amp;nbsp;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Add debugging hooks to #parse
&lt;br&gt;&amp;gt; -----------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-586
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-586&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-586&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Improvement
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Engine
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.5
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Tim White
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Priority: Minor
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; When you have a page that is made up of a complex web of templates and #parsed includes, it is critical to be able to quickly see what parts of the page are really in what file.
&lt;br&gt;&amp;gt; To do this, I've hacked #parse to inject debugging information into the template when a 'debug mode' is engaged. &amp;nbsp;This debug mode is engaged via a URL parameter.
&lt;br&gt;&amp;gt; I also inject this information in the VVS right before the main template is rendered. &amp;nbsp;In this way, you can create a debug overlay on top of the page in your browser that shows you where each piece of text is coming from.
&lt;br&gt;&amp;gt; I think this probably could better be implemented using hooks, so that a user could trigger when the debug information was being injected.
&lt;br&gt;&amp;gt; I also suggest that the name of the current template, it's resource loader, etc. be passed into the context, so it can be used to see what template is where and what loader it came from.
&lt;br&gt;&amp;gt; Finally, if there could be a way to conditionally prepend or append a template to each merged or #parse template, that could also help.
&lt;br&gt;&amp;gt; Thanks!!!
&lt;br&gt;&amp;gt; package org.apache.velocity.runtime.directive;
&lt;br&gt;&amp;gt; /*
&lt;br&gt;&amp;gt; &amp;nbsp;* Licensed to the Apache Software Foundation (ASF) under one
&lt;br&gt;&amp;gt; &amp;nbsp;* or more contributor license agreements. &amp;nbsp;See the NOTICE file
&lt;br&gt;&amp;gt; &amp;nbsp;* distributed with this work for additional information
&lt;br&gt;&amp;gt; &amp;nbsp;* regarding copyright ownership. &amp;nbsp;The ASF licenses this file
&lt;br&gt;&amp;gt; &amp;nbsp;* to you under the Apache License, Version 2.0 (the
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;quot;License&amp;quot;); you may not use this file except in compliance
&lt;br&gt;&amp;gt; &amp;nbsp;* with the License. &amp;nbsp;You may obtain a copy of the License at
&lt;br&gt;&amp;gt; &amp;nbsp;*
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;nbsp; &lt;a href=&quot;http://www.apache.org/licenses/LICENSE-2.0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.apache.org/licenses/LICENSE-2.0&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp;*
&lt;br&gt;&amp;gt; &amp;nbsp;* Unless required by applicable law or agreed to in writing,
&lt;br&gt;&amp;gt; &amp;nbsp;* software distributed under the License is distributed on an
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;quot;AS IS&amp;quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
&lt;br&gt;&amp;gt; &amp;nbsp;* KIND, either express or implied. &amp;nbsp;See the License for the
&lt;br&gt;&amp;gt; &amp;nbsp;* specific language governing permissions and limitations
&lt;br&gt;&amp;gt; &amp;nbsp;* under the License. &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt; &amp;nbsp;*/
&lt;br&gt;&amp;gt; import java.io.IOException;
&lt;br&gt;&amp;gt; import java.io.Writer;
&lt;br&gt;&amp;gt; import javax.servlet.http.HttpSession;
&lt;br&gt;&amp;gt; import org.apache.velocity.Template;
&lt;br&gt;&amp;gt; import org.apache.velocity.app.event.EventHandlerUtil;
&lt;br&gt;&amp;gt; import org.apache.velocity.context.InternalContextAdapter;
&lt;br&gt;&amp;gt; import org.apache.velocity.exception.MethodInvocationException;
&lt;br&gt;&amp;gt; import org.apache.velocity.exception.ParseErrorException;
&lt;br&gt;&amp;gt; import org.apache.velocity.exception.ResourceNotFoundException;
&lt;br&gt;&amp;gt; import org.apache.velocity.runtime.RuntimeConstants;
&lt;br&gt;&amp;gt; import org.apache.velocity.runtime.parser.node.Node;
&lt;br&gt;&amp;gt; import org.apache.velocity.runtime.parser.node.SimpleNode;
&lt;br&gt;&amp;gt; import com.qwest.velocity.VelocityConstants;
&lt;br&gt;&amp;gt; /**
&lt;br&gt;&amp;gt; &amp;nbsp;* Pluggable directive that handles the &amp;lt;code&amp;gt;#parse()&amp;lt;/code&amp;gt; statement in VTL.
&lt;br&gt;&amp;gt; &amp;nbsp;* 
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;lt;pre&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;nbsp;Notes:
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;nbsp;-----
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;nbsp; 1) The parsed source material can only come from somewhere in
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;nbsp; &amp;nbsp; the TemplateRoot tree for security reasons. There is no way
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;nbsp; &amp;nbsp; around this. &amp;nbsp;If you want to include content from elsewhere on
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;nbsp; &amp;nbsp; your disk, use a link from somwhere under Template Root to that
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;nbsp; &amp;nbsp; content.
&lt;br&gt;&amp;gt; &amp;nbsp;* 
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;nbsp; 2) There is a limited parse depth. &amp;nbsp;It is set as a property
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;nbsp; &amp;nbsp; &amp;quot;parse_directive.maxdepth = 10&amp;quot; &amp;nbsp;for example. &amp;nbsp;There is a 20 iteration
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;nbsp; &amp;nbsp; safety in the event that the parameter isn't set.
&lt;br&gt;&amp;gt; &amp;nbsp;* &amp;lt;/pre&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;* 
&lt;br&gt;&amp;gt; &amp;nbsp;* @author &amp;lt;a href=&amp;quot;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174381&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;geirm@...&lt;/a&gt;&amp;quot;&amp;gt;Geir Magnusson Jr.&amp;lt;/a&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;* @author &amp;lt;a href=&amp;quot;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174381&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jvanzyl@...&lt;/a&gt;&amp;quot;&amp;gt;Jason van Zyl&amp;lt;/a&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;* @author &amp;lt;a href=&amp;quot;mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174381&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Christoph.Reck@...&lt;/a&gt;&amp;quot;&amp;gt;Christoph Reck&amp;lt;/a&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;* @version $Id: Parse.java 463298 2006-10-12 16:10:32Z henning $
&lt;br&gt;&amp;gt; &amp;nbsp;*/
&lt;br&gt;&amp;gt; public class Parse extends InputBase {
&lt;br&gt;&amp;gt; 	/**
&lt;br&gt;&amp;gt; 	 * Return name of this directive.
&lt;br&gt;&amp;gt; 	 * 
&lt;br&gt;&amp;gt; 	 * @return The name of this directive.
&lt;br&gt;&amp;gt; 	 */
&lt;br&gt;&amp;gt; 	public String getName() {
&lt;br&gt;&amp;gt; 		return &amp;quot;parse&amp;quot;;
&lt;br&gt;&amp;gt; 	}
&lt;br&gt;&amp;gt; 	/**
&lt;br&gt;&amp;gt; 	 * Return type of this directive.
&lt;br&gt;&amp;gt; 	 * 
&lt;br&gt;&amp;gt; 	 * @return The type of this directive.
&lt;br&gt;&amp;gt; 	 */
&lt;br&gt;&amp;gt; 	public int getType() {
&lt;br&gt;&amp;gt; 		return LINE;
&lt;br&gt;&amp;gt; 	}
&lt;br&gt;&amp;gt; 	/**
&lt;br&gt;&amp;gt; 	 * iterates through the argument list and renders every argument that is appropriate. Any non appropriate arguments are logged, but render() continues.
&lt;br&gt;&amp;gt; 	 * 
&lt;br&gt;&amp;gt; 	 * @param context
&lt;br&gt;&amp;gt; 	 * @param writer
&lt;br&gt;&amp;gt; 	 * @param node
&lt;br&gt;&amp;gt; 	 * @return True if the directive rendered successfully.
&lt;br&gt;&amp;gt; 	 * @throws IOException
&lt;br&gt;&amp;gt; 	 * @throws ResourceNotFoundException
&lt;br&gt;&amp;gt; 	 * @throws ParseErrorException
&lt;br&gt;&amp;gt; 	 * @throws MethodInvocationException
&lt;br&gt;&amp;gt; 	 */
&lt;br&gt;&amp;gt; 	public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException {
&lt;br&gt;&amp;gt; 		/*
&lt;br&gt;&amp;gt; 		 * if rendering is no longer allowed (after a stop), we can safely skip execution of all the parse directives.
&lt;br&gt;&amp;gt; 		 */
&lt;br&gt;&amp;gt; 		if (!context.getAllowRendering()) {
&lt;br&gt;&amp;gt; 			return true;
&lt;br&gt;&amp;gt; 		}
&lt;br&gt;&amp;gt; 		/*
&lt;br&gt;&amp;gt; 		 * did we get an argument?
&lt;br&gt;&amp;gt; 		 */
&lt;br&gt;&amp;gt; 		if (node.jjtGetChild(0) == null) {
&lt;br&gt;&amp;gt; 			rsvc.getLog().error(&amp;quot;Portal #parse() null argument&amp;quot;);
&lt;br&gt;&amp;gt; 			return false;
&lt;br&gt;&amp;gt; 		}
&lt;br&gt;&amp;gt; 		/*
&lt;br&gt;&amp;gt; 		 * does it have a value? If you have a null reference, then no.
&lt;br&gt;&amp;gt; 		 */
&lt;br&gt;&amp;gt; 		Object value = node.jjtGetChild(0).value(context);
&lt;br&gt;&amp;gt; 		if (value == null) {
&lt;br&gt;&amp;gt; 			rsvc.getLog().error(&amp;quot;Portal #parse() null argument&amp;quot;);
&lt;br&gt;&amp;gt; 			return false;
&lt;br&gt;&amp;gt; 		}
&lt;br&gt;&amp;gt; 		/*
&lt;br&gt;&amp;gt; 		 * get the path
&lt;br&gt;&amp;gt; 		 */
&lt;br&gt;&amp;gt; 		String sourcearg = value.toString();
&lt;br&gt;&amp;gt; 		/*
&lt;br&gt;&amp;gt; 		 * check to see if the argument will be changed by the event cartridge
&lt;br&gt;&amp;gt; 		 */
&lt;br&gt;&amp;gt; 		String arg = EventHandlerUtil.includeEvent(rsvc, context, sourcearg, context.getCurrentTemplateName(), getName());
&lt;br&gt;&amp;gt; 		/*
&lt;br&gt;&amp;gt; 		 * a null return value from the event cartridge indicates we should not input a resource.
&lt;br&gt;&amp;gt; 		 */
&lt;br&gt;&amp;gt; 		boolean blockinput = false;
&lt;br&gt;&amp;gt; 		if (arg == null)
&lt;br&gt;&amp;gt; 			blockinput = true;
&lt;br&gt;&amp;gt; 		/*
&lt;br&gt;&amp;gt; 		 * see if we have exceeded the configured depth. If it isn't configured, put a stop at 20 just in case.
&lt;br&gt;&amp;gt; 		 */
&lt;br&gt;&amp;gt; 		Object[] templateStack = context.getTemplateNameStack();
&lt;br&gt;&amp;gt; 		if (templateStack.length &amp;gt;= rsvc.getInt(RuntimeConstants.PARSE_DIRECTIVE_MAXDEPTH, 20)) {
&lt;br&gt;&amp;gt; 			StringBuffer path = new StringBuffer();
&lt;br&gt;&amp;gt; 			for (int i = 0; i &amp;lt; templateStack.length; ++i) {
&lt;br&gt;&amp;gt; 				path.append(&amp;quot; &amp;gt; &amp;quot; + templateStack[i]);
&lt;br&gt;&amp;gt; 			}
&lt;br&gt;&amp;gt; 			rsvc.getLog().error(&amp;quot;Portal #parse: Max recursion depth reached (&amp;quot; + templateStack.length + ')' + &amp;quot; File stack:&amp;quot; + path);
&lt;br&gt;&amp;gt; 			return false;
&lt;br&gt;&amp;gt; 		}
&lt;br&gt;&amp;gt; 		/*
&lt;br&gt;&amp;gt; 		 * now use the Runtime resource loader to get the template
&lt;br&gt;&amp;gt; 		 */
&lt;br&gt;&amp;gt; 		Template t = null;
&lt;br&gt;&amp;gt; 		try {
&lt;br&gt;&amp;gt; 			if (!blockinput)
&lt;br&gt;&amp;gt; 				t = rsvc.getTemplate(arg, getInputEncoding(context));
&lt;br&gt;&amp;gt; 		} catch (ResourceNotFoundException rnfe) {
&lt;br&gt;&amp;gt; 			/*
&lt;br&gt;&amp;gt; 			 * the arg wasn't found. Note it and throw
&lt;br&gt;&amp;gt; 			 */
&lt;br&gt;&amp;gt; 			rsvc.getLog().error(&amp;quot;Portal #parse(): cannot find template '&amp;quot; + arg + &amp;quot;', called from template &amp;quot; + context.getCurrentTemplateName() + &amp;quot; at (&amp;quot; + getLine() + &amp;quot;, &amp;quot; + getColumn() + &amp;quot;)&amp;quot;);
&lt;br&gt;&amp;gt; 			throw rnfe;
&lt;br&gt;&amp;gt; 		} catch (ParseErrorException pee) {
&lt;br&gt;&amp;gt; 			/*
&lt;br&gt;&amp;gt; 			 * the arg was found, but didn't parse - syntax error note it and throw
&lt;br&gt;&amp;gt; 			 */
&lt;br&gt;&amp;gt; 			rsvc.getLog().error(
&lt;br&gt;&amp;gt; 					&amp;quot;Portal #parse(): syntax error in #parse()-ed template '&amp;quot; + arg + &amp;quot;', called from template &amp;quot; + context.getCurrentTemplateName() + &amp;quot; at (&amp;quot; + getLine() + &amp;quot;, &amp;quot; + getColumn() + &amp;quot;)&amp;quot;);
&lt;br&gt;&amp;gt; 			throw pee;
&lt;br&gt;&amp;gt; 		}
&lt;br&gt;&amp;gt; 		/**
&lt;br&gt;&amp;gt; 		 * pass through application level runtime exceptions
&lt;br&gt;&amp;gt; 		 */
&lt;br&gt;&amp;gt; 		catch (RuntimeException e) {
&lt;br&gt;&amp;gt; 			throw e;
&lt;br&gt;&amp;gt; 		} catch (Exception e) {
&lt;br&gt;&amp;gt; 			rsvc.getLog().error(&amp;quot;Portal #parse() : arg = &amp;quot; + arg + '.', e);
&lt;br&gt;&amp;gt; 			return false;
&lt;br&gt;&amp;gt; 		}
&lt;br&gt;&amp;gt; 		/*
&lt;br&gt;&amp;gt; 		 * and render it
&lt;br&gt;&amp;gt; 		 */
&lt;br&gt;&amp;gt; 		try {
&lt;br&gt;&amp;gt; 			if (rsvc.getLog().isDebugEnabled()) {
&lt;br&gt;&amp;gt; 				rsvc.getLog().debug(&amp;quot;*** Portal #Parse Template Path: &amp;quot; + t.getName());
&lt;br&gt;&amp;gt; 			}
&lt;br&gt;&amp;gt; 			
&lt;br&gt;&amp;gt; 			/* Save the name of the main template before resetting templateName for this include */
&lt;br&gt;&amp;gt; 			String mainTemplateName = &amp;quot;&amp;quot;;
&lt;br&gt;&amp;gt; 			if (context.get(VelocityConstants.TEMPLATE_NAME_VAR) != null) {
&lt;br&gt;&amp;gt; 				mainTemplateName = context.get(VelocityConstants.TEMPLATE_NAME_VAR).toString();
&lt;br&gt;&amp;gt; 			}
&lt;br&gt;&amp;gt; 			/* Set the name of the current template in the context for general use */
&lt;br&gt;&amp;gt; 			context.put(VelocityConstants.TEMPLATE_NAME_VAR, t.getName());
&lt;br&gt;&amp;gt; 			/* Check various places to see if debug mode is enabled */
&lt;br&gt;&amp;gt; 			boolean debugMode = false;
&lt;br&gt;&amp;gt; 			/* This supports PortalVelocityViewServlet */
&lt;br&gt;&amp;gt; 			if (context.get(VelocityConstants.DEBUG_ATTRIBUTE) != null) {
&lt;br&gt;&amp;gt; 				debugMode = true;
&lt;br&gt;&amp;gt; 			}
&lt;br&gt;&amp;gt; 			/* This supports qcms.getMessage() */
&lt;br&gt;&amp;gt; 			if (context.get(&amp;quot;session&amp;quot;) != null) {
&lt;br&gt;&amp;gt; 				HttpSession session = (HttpSession) context.get(&amp;quot;session&amp;quot;);
&lt;br&gt;&amp;gt; 				if (session.getAttribute(&amp;quot;qCmsDebugger&amp;quot;) != null) {
&lt;br&gt;&amp;gt; 					debugMode = true;
&lt;br&gt;&amp;gt; 				}
&lt;br&gt;&amp;gt; 			}
&lt;br&gt;&amp;gt; 			/* Print Debug start output to browser if debug mode is on */
&lt;br&gt;&amp;gt; 			if (debugMode) {
&lt;br&gt;&amp;gt; 				Template startTemplate = rsvc.getTemplate(VelocityConstants.DEBUG_OUTLINE_START_TEMPLATE, getInputEncoding(context));
&lt;br&gt;&amp;gt; 				startTemplate.merge(context, writer);
&lt;br&gt;&amp;gt; 				Template nameTemplate = rsvc.getTemplate(VelocityConstants.DEBUG_NAME_TEMPLATE, getInputEncoding(context));
&lt;br&gt;&amp;gt; 				nameTemplate.merge(context, writer);
&lt;br&gt;&amp;gt; 			}
&lt;br&gt;&amp;gt; 			
&lt;br&gt;&amp;gt; 			if (!blockinput) {
&lt;br&gt;&amp;gt; 				context.pushCurrentTemplateName(arg);
&lt;br&gt;&amp;gt; 				((SimpleNode) t.getData()).render(context, writer);
&lt;br&gt;&amp;gt; 			}
&lt;br&gt;&amp;gt; 			
&lt;br&gt;&amp;gt; 			/* Print Debug end output to browser if debug mode is on */
&lt;br&gt;&amp;gt; 			if (debugMode) {
&lt;br&gt;&amp;gt; 				Template endTemplate = rsvc.getTemplate(VelocityConstants.DEBUG_OUTLINE_END_TEMPLATE, getInputEncoding(context));
&lt;br&gt;&amp;gt; 				endTemplate.merge(context, writer);
&lt;br&gt;&amp;gt; 			}
&lt;br&gt;&amp;gt; 			/* Restore the templateName variable to match the main template name */
&lt;br&gt;&amp;gt; 			context.put(VelocityConstants.TEMPLATE_NAME_VAR, mainTemplateName);
&lt;br&gt;&amp;gt; 		}
&lt;br&gt;&amp;gt; 		/*
&lt;br&gt;&amp;gt; 		 * if it's a MIE, it came from the render.... throw it...
&lt;br&gt;&amp;gt; 		 */
&lt;br&gt;&amp;gt; 		catch (MethodInvocationException e) {
&lt;br&gt;&amp;gt; 			throw e;
&lt;br&gt;&amp;gt; 		}
&lt;br&gt;&amp;gt; 		/**
&lt;br&gt;&amp;gt; 		 * pass through application level runtime exceptions
&lt;br&gt;&amp;gt; 		 */
&lt;br&gt;&amp;gt; 		catch (RuntimeException e) {
&lt;br&gt;&amp;gt; 			throw e;
&lt;br&gt;&amp;gt; 		}
&lt;br&gt;&amp;gt; 		catch (Exception e) {
&lt;br&gt;&amp;gt; 			rsvc.getLog().error(&amp;quot;Portal #parse: Exception rendering #parse(&amp;quot; + arg + ')', e);
&lt;br&gt;&amp;gt; 			return false;
&lt;br&gt;&amp;gt; 		} finally {
&lt;br&gt;&amp;gt; 			if (!blockinput)
&lt;br&gt;&amp;gt; 				context.popCurrentTemplateName();
&lt;br&gt;&amp;gt; 		}
&lt;br&gt;&amp;gt; 		/*
&lt;br&gt;&amp;gt; 		 * note - a blocked input is still a successful operation as this is expected behavior.
&lt;br&gt;&amp;gt; 		 */
&lt;br&gt;&amp;gt; 		return true;
&lt;br&gt;&amp;gt; 	}
&lt;br&gt;&amp;gt; }
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174381&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174381&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-586%29-Add-debugging-hooks-to--parse-tp15187432p26174381.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26174348</id>
	<title>[jira] Updated: (VELOCITY-715) Leaked object in FileResourceLoader#templatePaths</title>
	<published>2009-11-02T19:06:00Z</published>
	<updated>2009-11-02T19:06:00Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Will Glass-Husain updated VELOCITY-715:
&lt;br&gt;---------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Fix Version/s: &amp;nbsp; &amp;nbsp; (was: 1.7)
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Leaked object in FileResourceLoader#templatePaths
&lt;br&gt;&amp;gt; -------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-715
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-715&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-715&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Engine
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Atsushi Isobe
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Priority: Minor
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: FileResourceLoader.patch, FileResourceLoaderLeakedObjectTest.java
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;org.apache.velocity.runtime.resource.loader.FileResourceLoader#templatePaths has stored templatename and real file path permanently.So if VelocityEngine#getTemplate(String) has called by too many files, #templatePaths have been enlarged. 
&lt;br&gt;&amp;gt; Bellow my test results.
&lt;br&gt;&amp;gt; ----------------------------------------
&lt;br&gt;&amp;gt; 2009-05-08 19:16:54,571 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 000,000 total: 002,696,488
&lt;br&gt;&amp;gt; 2009-05-08 19:19:23,381 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 065,536 total: 014,689,896
&lt;br&gt;&amp;gt; 2009-05-08 19:22:03,782 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 131,072 total: 025,374,944
&lt;br&gt;&amp;gt; 2009-05-08 19:24:14,756 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 196,608 total: 036,282,696
&lt;br&gt;&amp;gt; 2009-05-08 19:26:37,864 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 262,144 total: 046,776,168
&lt;br&gt;&amp;gt; 2009-05-08 19:28:55,090 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 327,680 total: 057,119,560
&lt;br&gt;&amp;gt; 2009-05-08 19:31:37,524 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 393,216 total: 069,858,824
&lt;br&gt;&amp;gt; 2009-05-08 19:34:10,425 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 458,752 total: 080,019,920
&lt;br&gt;&amp;gt; 2009-05-08 19:36:52,788 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 524,288 total: 090,093,168
&lt;br&gt;&amp;gt; 2009-05-08 19:39:13,662 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 589,824 total: 097,385,776
&lt;br&gt;&amp;gt; 2009-05-08 19:41:54,621 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 655,360 total: 107,387,792
&lt;br&gt;&amp;gt; 2009-05-08 19:44:31,601 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 720,896 total: 117,451,912
&lt;br&gt;&amp;gt; 2009-05-08 19:47:08,890 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 786,432 total: 137,151,792
&lt;br&gt;&amp;gt; 2009-05-08 19:49:44,924 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 851,968 total: 147,277,856
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174348&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174348&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-715%29-Leaked-object-in-FileResourceLoader-templatePaths-tp23444710p26174348.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26174351</id>
	<title>[jira] Commented: (VELOCITY-715) Leaked object in FileResourceLoader#templatePaths</title>
	<published>2009-11-02T19:05:59Z</published>
	<updated>2009-11-02T19:05:59Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; [ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12772855#action_12772855&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12772855#action_12772855&lt;/a&gt;&amp;nbsp;] 
&lt;br&gt;&lt;br&gt;Will Glass-Husain commented on VELOCITY-715:
&lt;br&gt;--------------------------------------------
&lt;br&gt;&lt;br&gt;Thanks for sharing this.
&lt;br&gt;&lt;br&gt;This isn't a use case I've encountered. &amp;nbsp;These are all unique file names, right? &amp;nbsp;Your test is assuming hundreds of thousands of different file names. &amp;nbsp;Most sites I've seen have a much smaller number of template names.
&lt;br&gt;&lt;br&gt;I'm also concerned about the use of a WeakHashMap. &amp;nbsp;I'm not super experienced with this, but doesn't this remove the key but not the value? &amp;nbsp;I'm concerned this may still leave the reference.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.codeinstructions.com/2008/09/weakhashmap-is-not-cache-understanding.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.codeinstructions.com/2008/09/weakhashmap-is-not-cache-understanding.html&lt;/a&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Leaked object in FileResourceLoader#templatePaths
&lt;br&gt;&amp;gt; -------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-715
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-715&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-715&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Engine
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Atsushi Isobe
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Priority: Minor
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: FileResourceLoader.patch, FileResourceLoaderLeakedObjectTest.java
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp;org.apache.velocity.runtime.resource.loader.FileResourceLoader#templatePaths has stored templatename and real file path permanently.So if VelocityEngine#getTemplate(String) has called by too many files, #templatePaths have been enlarged. 
&lt;br&gt;&amp;gt; Bellow my test results.
&lt;br&gt;&amp;gt; ----------------------------------------
&lt;br&gt;&amp;gt; 2009-05-08 19:16:54,571 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 000,000 total: 002,696,488
&lt;br&gt;&amp;gt; 2009-05-08 19:19:23,381 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 065,536 total: 014,689,896
&lt;br&gt;&amp;gt; 2009-05-08 19:22:03,782 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 131,072 total: 025,374,944
&lt;br&gt;&amp;gt; 2009-05-08 19:24:14,756 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 196,608 total: 036,282,696
&lt;br&gt;&amp;gt; 2009-05-08 19:26:37,864 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 262,144 total: 046,776,168
&lt;br&gt;&amp;gt; 2009-05-08 19:28:55,090 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 327,680 total: 057,119,560
&lt;br&gt;&amp;gt; 2009-05-08 19:31:37,524 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 393,216 total: 069,858,824
&lt;br&gt;&amp;gt; 2009-05-08 19:34:10,425 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 458,752 total: 080,019,920
&lt;br&gt;&amp;gt; 2009-05-08 19:36:52,788 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 524,288 total: 090,093,168
&lt;br&gt;&amp;gt; 2009-05-08 19:39:13,662 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 589,824 total: 097,385,776
&lt;br&gt;&amp;gt; 2009-05-08 19:41:54,621 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 655,360 total: 107,387,792
&lt;br&gt;&amp;gt; 2009-05-08 19:44:31,601 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 720,896 total: 117,451,912
&lt;br&gt;&amp;gt; 2009-05-08 19:47:08,890 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 786,432 total: 137,151,792
&lt;br&gt;&amp;gt; 2009-05-08 19:49:44,924 INFO &amp;nbsp;[FileResourceLoaderLeakedObjectTest] count: 851,968 total: 147,277,856
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174351&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174351&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-715%29-Leaked-object-in-FileResourceLoader-templatePaths-tp23444710p26174351.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26174298</id>
	<title>[jira] Resolved: (VELOCITY-738) It would be useful to know that the error is occurred in which context.</title>
	<published>2009-11-02T18:55:59Z</published>
	<updated>2009-11-02T18:55:59Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Will Glass-Husain resolved VELOCITY-738.
&lt;br&gt;----------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Resolution: Won't Fix
&lt;br&gt;&lt;br&gt;If you catch the ParseException, it contains properties for the template name, line, and column number,
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; It would be useful to know that the error is occurred in which context.
&lt;br&gt;&amp;gt; -----------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-738
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-738&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-738&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Improvement
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Engine
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.6.2
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Siri C.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It would be better, if an error message display surroundings of the place where the error is. 
&lt;br&gt;&amp;gt; For example: 
&lt;br&gt;&amp;gt; To display that an &amp;quot;(&amp;quot; character is illegal (there are hundreds of those characters in a template)
&lt;br&gt;&amp;gt; but it would be useful to know that this character occurred in the context &amp;quot;product.getName()&amp;quot;.
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174298&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174298&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-738%29-It-would-be-useful-to-know-that-the-error-is-occurred-in-which-context.-tp25904712p26174298.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26174283</id>
	<title>[jira] Commented: (VELOCITY-739) Do not throw exception for quiet references in strict reference checking mode</title>
	<published>2009-11-02T18:53:59Z</published>
	<updated>2009-11-02T18:53:59Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; [ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12772850#action_12772850&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12772850#action_12772850&lt;/a&gt;&amp;nbsp;] 
&lt;br&gt;&lt;br&gt;Will Glass-Husain commented on VELOCITY-739:
&lt;br&gt;--------------------------------------------
&lt;br&gt;&lt;br&gt;&lt;br&gt;In the interests of conservatism, I'm going to leave this alone. &amp;nbsp; &amp;nbsp;If more people want it speak up.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Do not throw exception for quiet references in strict reference checking mode
&lt;br&gt;&amp;gt; -----------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-739
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-739&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-739&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Improvement
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Engine
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.6.2
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Will Glass-Husain
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I used strict reference checking for the first time and discovered that it throws exceptions even for quiet references.
&lt;br&gt;&amp;gt; &amp;lt;input class=&amp;quot;signupInput&amp;quot; type=&amp;quot;text&amp;quot; id=&amp;quot;StxtFirstNames&amp;quot;
&lt;br&gt;&amp;gt; name=&amp;quot;firstName&amp;quot; value=&amp;quot;$!user.firstName&amp;quot;/&amp;gt;
&lt;br&gt;&amp;gt; org.apache.velocity.exception.MethodInvocationException: Variable
&lt;br&gt;&amp;gt; $user has not been set at layout/slide_login.vm[line 13, column 117]
&lt;br&gt;&amp;gt; This doesn't make sense to me. &amp;nbsp;If a template author designates a reference as quiet, it's explicitly not an error. &amp;nbsp;We're preventing the use of this convenient feature.
&lt;br&gt;&amp;gt; It's not a hard change to fix this. &amp;nbsp;Does it break backwards compatibility if we change this?
&lt;br&gt;&amp;gt; Incidentally, there's an identical problem for InvalidReferenceEventHandler. &amp;nbsp;I'll file a separate issue.
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174283&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174283&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-739%29-Do-not-throw-exception-for-quiet-references-in-strict-reference-checking-mode-tp25929086p26174283.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26174244</id>
	<title>[jira] Resolved: (VELOCITY-720) Suppress startup error message if macro library not found</title>
	<published>2009-11-02T18:49:59Z</published>
	<updated>2009-11-02T18:49:59Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Will Glass-Husain resolved VELOCITY-720.
&lt;br&gt;----------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Resolution: Fixed
&lt;br&gt;&lt;br&gt;I changed the Resource Loader code to omit the stack trace for a resource not found. &amp;nbsp;It seems overkill. &amp;nbsp;(and rather frightening). &amp;nbsp; It still logs the message, in this case: cannot find resource VM_global_library.vm.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Suppress startup error message if macro library not found
&lt;br&gt;&amp;gt; ---------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-720
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-720&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-720&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Improvement
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Engine
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Will Glass-Husain
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Priority: Minor
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.7
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Ever since upgrading to Velocity 1.6.2 I get a stack trace when starting up due to a missing macro library. &amp;nbsp;The stack trace in particular makes for a very noisy log. &amp;nbsp;I suggest we do not print a stacktrace for a missing macro library at startup.
&lt;br&gt;&amp;gt; &amp;nbsp;Here's my settings
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;VelocityEngine ve = new VelocityEngine();
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ve.setProperty(&amp;quot;resource.loader&amp;quot;, &amp;quot;class&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ve.setProperty(&amp;quot;class.resource.loader.class&amp;quot;, &amp;quot;org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ve.setProperty(&amp;quot;class.resource.loader.cache&amp;quot;, &amp;quot;false&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ve.setProperty(&amp;quot;runtime.Log.invalid.references &amp;quot;, &amp;quot;false&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ve.setProperty(&amp;quot;resource.manager.logwhenfound&amp;quot;, &amp;quot;false&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ve.setProperty(&amp;quot;runtime.log.logsystem.class&amp;quot;, &amp;quot;org.apache.velocity.runtime.log.SimpleLog4JLogSystem&amp;quot;);
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ve.setProperty(&amp;quot;runtime.log.logsystem.log4j.category&amp;quot;, &amp;quot;com.forio.Velocity&amp;quot;);
&lt;br&gt;&amp;gt; And here's the log report
&lt;br&gt;&amp;gt; 2009-05-26 23:46:58 DEBUG Velocimacro : &amp;quot;velocimacro.library&amp;quot; is not set. &amp;nbsp;Trying default library: VM_global_library.vm
&lt;br&gt;&amp;gt; 2009-05-26 23:46:58 DEBUG Could not load resource 'VM_global_library.vm' from ResourceLoader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader:
&lt;br&gt;&amp;gt; 2009-05-26 23:46:58 DEBUG
&lt;br&gt;&amp;gt; org.apache.velocity.exception.ResourceNotFoundException:
&lt;br&gt;&amp;gt; ClasspathResourceLoader Error: cannot find resource VM_global_library.vm
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader.getResourceStream(ClasspathResourceLoader.java:131)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.resource.loader.ResourceLoader.resourceExists(ResourceLoader.java:224)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.resource.ResourceManagerImpl.getLoaderForResource(ResourceManagerImpl.java:641)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.resource.ResourceManagerImpl.getLoaderNameForResource(ResourceManagerImpl.java:624)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.RuntimeInstance.getLoaderNameForResource(RuntimeInstance.java:1464)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.VelocimacroFactory.initVelocimacro(VelocimacroFactory.java:159)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:261)
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:107)
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174244&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174244&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-720%29-Suppress-startup-error-message-if-macro-library-not-found-tp23747786p26174244.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26174165</id>
	<title>[jira] Resolved: (VELOCITY-724) [PATCH] Is junit-3.8.1.jar optional for Velocity as specified in jar dependencies?</title>
	<published>2009-11-02T18:39:59Z</published>
	<updated>2009-11-02T18:39:59Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Will Glass-Husain resolved VELOCITY-724.
&lt;br&gt;----------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Resolution: Fixed
&lt;br&gt;&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;It makes sense to me to upgrade to ant 1.7-- it's been out for a long time. &amp;nbsp;(and the manual copying of junit lib is very confusing).
&lt;br&gt;&lt;br&gt;I went ahead and upgraded to ant 1.7 but did not drop junit dependency. &amp;nbsp;(changed the build file with your patch and the docs). &amp;nbsp;It doesn't look like ant comes with junit. &amp;nbsp;Instead, if it's in the app classpath, it uses it automatically (no need to copy to lib directory). &amp;nbsp;Does this sound right?
&lt;br&gt;&lt;br&gt;Go ahead and reopen the issue if you've further comments.
&lt;br&gt;&lt;br&gt;Thanks for raising the issue. &amp;nbsp;
&lt;br&gt;&lt;br&gt;WILL
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; [PATCH] Is junit-3.8.1.jar optional for Velocity as specified in jar dependencies?
&lt;br&gt;&amp;gt; ----------------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-724
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-724&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-724&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Build
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.6.2
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Aruna Venkataraman
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Priority: Trivial
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.7
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: Build succeeds with junit.jar.jpg, build.patch, current error message.PNG, jnuit build failed.jpg, revised error message.PNG, svn diff.PNG
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; When i navigate to the build directory in Velocity 1.6.2 and invoke &amp;quot;ant&amp;quot; then the below error is got:
&lt;br&gt;&amp;gt; Could not create task or type of type: junit. lib\test. 
&lt;br&gt;&amp;gt; Ant could not find the task or a class this task relies upon.
&lt;br&gt;&amp;gt; Refer screenshot
&lt;br&gt;&amp;gt; I deleted the junit-3.8.1.jar file from bin\test-lib as it was specified to be optional, but it gets created automatically. 
&lt;br&gt;&amp;gt; Do we need to remove the dependency on this junit-3.8.1.jar manually? 
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174165&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174165&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-724%29-Is-junit-3.8.1.jar-optional-for-Velocity-as-specified-in-jar-dependencies--tp23813362p26174165.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26174125</id>
	<title>[jira] Updated: (VELOCITY-724) [PATCH] Is junit-3.8.1.jar optional for Velocity as specified in jar dependencies?</title>
	<published>2009-11-02T18:33:59Z</published>
	<updated>2009-11-02T18:33:59Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Will Glass-Husain updated VELOCITY-724:
&lt;br&gt;---------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Attachment: &amp;nbsp; &amp;nbsp; (was: ant17.patch)
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; [PATCH] Is junit-3.8.1.jar optional for Velocity as specified in jar dependencies?
&lt;br&gt;&amp;gt; ----------------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-724
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-724&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-724&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Build
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.6.2
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Aruna Venkataraman
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Priority: Trivial
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.7
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: Build succeeds with junit.jar.jpg, build.patch, current error message.PNG, jnuit build failed.jpg, revised error message.PNG, svn diff.PNG
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; When i navigate to the build directory in Velocity 1.6.2 and invoke &amp;quot;ant&amp;quot; then the below error is got:
&lt;br&gt;&amp;gt; Could not create task or type of type: junit. lib\test. 
&lt;br&gt;&amp;gt; Ant could not find the task or a class this task relies upon.
&lt;br&gt;&amp;gt; Refer screenshot
&lt;br&gt;&amp;gt; I deleted the junit-3.8.1.jar file from bin\test-lib as it was specified to be optional, but it gets created automatically. 
&lt;br&gt;&amp;gt; Do we need to remove the dependency on this junit-3.8.1.jar manually? 
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174125&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174125&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-724%29-Is-junit-3.8.1.jar-optional-for-Velocity-as-specified-in-jar-dependencies--tp23813362p26174125.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26174081</id>
	<title>[jira] Updated: (VELOCITY-724) [PATCH] Is junit-3.8.1.jar optional for Velocity as specified in jar dependencies?</title>
	<published>2009-11-02T18:27:59Z</published>
	<updated>2009-11-02T18:27:59Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Will Glass-Husain updated VELOCITY-724:
&lt;br&gt;---------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Attachment: ant17.patch
&lt;br&gt;&lt;br&gt;upgrade requirements to ant 1.7 and drop junit download. &amp;nbsp;
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; [PATCH] Is junit-3.8.1.jar optional for Velocity as specified in jar dependencies?
&lt;br&gt;&amp;gt; ----------------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-724
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-724&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-724&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Build
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.6.2
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Aruna Venkataraman
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Priority: Trivial
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.7
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Attachments: ant17.patch, Build succeeds with junit.jar.jpg, build.patch, current error message.PNG, jnuit build failed.jpg, revised error message.PNG, svn diff.PNG
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; When i navigate to the build directory in Velocity 1.6.2 and invoke &amp;quot;ant&amp;quot; then the below error is got:
&lt;br&gt;&amp;gt; Could not create task or type of type: junit. lib\test. 
&lt;br&gt;&amp;gt; Ant could not find the task or a class this task relies upon.
&lt;br&gt;&amp;gt; Refer screenshot
&lt;br&gt;&amp;gt; I deleted the junit-3.8.1.jar file from bin\test-lib as it was specified to be optional, but it gets created automatically. 
&lt;br&gt;&amp;gt; Do we need to remove the dependency on this junit-3.8.1.jar manually? 
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174081&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26174081&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-724%29-Is-junit-3.8.1.jar-optional-for-Velocity-as-specified-in-jar-dependencies--tp23813362p26174081.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26173970</id>
	<title>[jira] Resolved: (VELOCITY-717) Engine throws an NPE using custom macro libs if the IncludeEventHandler returns null</title>
	<published>2009-11-02T18:11:59Z</published>
	<updated>2009-11-02T18:11:59Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;[ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel&lt;/a&gt;&amp;nbsp;]
&lt;br&gt;&lt;br&gt;Will Glass-Husain resolved VELOCITY-717.
&lt;br&gt;----------------------------------------
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; Resolution: Cannot Reproduce
&lt;br&gt;&lt;br&gt;resolving. &amp;nbsp;try with the latest version (from svn head). &amp;nbsp;if you still have this difficulty, please reopen the bug and give a little more detail. &amp;nbsp;Thanks!
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Engine throws an NPE using custom macro libs if the IncludeEventHandler returns null
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-717
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-717&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-717&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Engine
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.6.2
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Environment: Suse Linux
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Johann Weber
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Priority: Critical
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.7
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The Engine throws an NPE if the IncludeEventHandler returns null.
&lt;br&gt;&amp;gt; (using merge method with a list of macro libs)
&lt;br&gt;&amp;gt; &amp;nbsp;java.lang.NullPointerException
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at java.util.Hashtable.get(Hashtable.java:333)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.VelocimacroManager.getNamespace(VelocimacroManager.java:318)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.VelocimacroManager.get(VelocimacroManager.java:215)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.VelocimacroFactory.getVelocimacro(VelocimacroFactory.java:563)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.RuntimeInstance.getVelocimacro(RuntimeInstance.java:1563)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:218)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.directive.Parse.render(Parse.java:260)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.Template.merge(Template.java:328)
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26173970&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26173970&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-717%29-Engine-throws-an-NPE-using-custom-macro-libs-if-the-IncludeEventHandler-returns-null-tp23566334p26173970.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26173937</id>
	<title>[jira] Commented: (VELOCITY-717) Engine throws an NPE using custom macro libs if the IncludeEventHandler returns null</title>
	<published>2009-11-02T18:07:59Z</published>
	<updated>2009-11-02T18:07:59Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; [ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12772828#action_12772828&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12772828#action_12772828&lt;/a&gt;&amp;nbsp;] 
&lt;br&gt;&lt;br&gt;Will Glass-Husain commented on VELOCITY-717:
&lt;br&gt;--------------------------------------------
&lt;br&gt;&lt;br&gt;Hi,
&lt;br&gt;&lt;br&gt;I tried to replicate this issue and couldn't. I tried merging in a macro library with Template.merge() as you suggest. &amp;nbsp;I also tried doing #parse in the included file and referencing the macro in the parent file. &amp;nbsp;Neither generated an NPE.
&lt;br&gt;&lt;br&gt;Can you please provide more details, ideally the VM and macro files you are using, and a code sample showing how you include the macros and merge the code.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Engine throws an NPE using custom macro libs if the IncludeEventHandler returns null
&lt;br&gt;&amp;gt; ------------------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-717
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-717&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-717&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Bug
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Engine
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.6.2
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Environment: Suse Linux
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Johann Weber
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Priority: Critical
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Fix For: 1.7
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The Engine throws an NPE if the IncludeEventHandler returns null.
&lt;br&gt;&amp;gt; (using merge method with a list of macro libs)
&lt;br&gt;&amp;gt; &amp;nbsp;java.lang.NullPointerException
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at java.util.Hashtable.get(Hashtable.java:333)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.VelocimacroManager.getNamespace(VelocimacroManager.java:318)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.VelocimacroManager.get(VelocimacroManager.java:215)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.VelocimacroFactory.getVelocimacro(VelocimacroFactory.java:563)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.RuntimeInstance.getVelocimacro(RuntimeInstance.java:1563)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:218)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.directive.Parse.render(Parse.java:260)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;at org.apache.velocity.Template.merge(Template.java:328)
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26173937&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26173937&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-717%29-Engine-throws-an-NPE-using-custom-macro-libs-if-the-IncludeEventHandler-returns-null-tp23566334p26173937.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26138276</id>
	<title>[jira] Commented: (VELOCITY-739) Do not throw exception for quiet references in strict reference checking mode</title>
	<published>2009-10-30T16:23:59Z</published>
	<updated>2009-10-30T16:23:59Z</updated>
	<author>
		<name>Velocity - Dev mailing list-2</name>
	</author>
	<content type="html">&lt;br&gt;&amp;nbsp; &amp;nbsp; [ &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12772172#action_12772172&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&amp;focusedCommentId=12772172#action_12772172&lt;/a&gt;&amp;nbsp;] 
&lt;br&gt;&lt;br&gt;Byron Foster commented on VELOCITY-739:
&lt;br&gt;---------------------------------------
&lt;br&gt;&lt;br&gt;My preference would be the current behavior. &amp;nbsp;But, it's not a strong preference, &amp;nbsp;and if most people like the above described behavior, I would not object.
&lt;br&gt;&lt;br&gt;My only argument is that it casts a wider net, and now all references with the bang notation don't benefit as much from strict checking and error reporting.
&lt;br&gt;&lt;br&gt;I'v considered making it so that expressions that evaluate to null, simply render as an empty string without &amp;nbsp;error, which makes the current use of the bang reference unnecessary. &amp;nbsp;If someone did want stricter handling of nulls they could do it through handlers.
&lt;br&gt;&lt;br&gt;I assume that the above behavior is only for the root variable, so given:
&lt;br&gt;&lt;br&gt;$!a.b
&lt;br&gt;&lt;br&gt;if 'a' is not in the context, then nothing is rendered. But if 'a' is defined but does not contain the method 'b', or 'a' is null, then Velocity will throw an error.
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Do not throw exception for quiet references in strict reference checking mode
&lt;br&gt;&amp;gt; -----------------------------------------------------------------------------
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Key: VELOCITY-739
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; URL: &lt;a href=&quot;https://issues.apache.org/jira/browse/VELOCITY-739&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://issues.apache.org/jira/browse/VELOCITY-739&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Project: Velocity
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Issue Type: Improvement
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Components: Engine
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;Affects Versions: 1.6.2
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Reporter: Will Glass-Husain
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I used strict reference checking for the first time and discovered that it throws exceptions even for quiet references.
&lt;br&gt;&amp;gt; &amp;lt;input class=&amp;quot;signupInput&amp;quot; type=&amp;quot;text&amp;quot; id=&amp;quot;StxtFirstNames&amp;quot;
&lt;br&gt;&amp;gt; name=&amp;quot;firstName&amp;quot; value=&amp;quot;$!user.firstName&amp;quot;/&amp;gt;
&lt;br&gt;&amp;gt; org.apache.velocity.exception.MethodInvocationException: Variable
&lt;br&gt;&amp;gt; $user has not been set at layout/slide_login.vm[line 13, column 117]
&lt;br&gt;&amp;gt; This doesn't make sense to me. &amp;nbsp;If a template author designates a reference as quiet, it's explicitly not an error. &amp;nbsp;We're preventing the use of this convenient feature.
&lt;br&gt;&amp;gt; It's not a hard change to fix this. &amp;nbsp;Does it break backwards compatibility if we change this?
&lt;br&gt;&amp;gt; Incidentally, there's an identical problem for InvalidReferenceEventHandler. &amp;nbsp;I'll file a separate issue.
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;This message is automatically generated by JIRA.
&lt;br&gt;-
&lt;br&gt;You can reply to this email to add a comment to the issue online.
&lt;br&gt;&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26138276&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26138276&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-jira--Created%3A-%28VELOCITY-739%29-Do-not-throw-exception-for-quiet-references-in-strict-reference-checking-mode-tp25929086p26138276.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26118944</id>
	<title>Re: [tools] Adding localization method to DateTool</title>
	<published>2009-10-29T12:04:27Z</published>
	<updated>2009-10-29T12:04:27Z</updated>
	<author>
		<name>Nathan Bubna</name>
	</author>
	<content type="html">On Thu, Oct 29, 2009 at 8:06 AM, Christopher Schultz
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26118944&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;chris@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Nathan,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 10/29/2009 11:02 AM, Christopher Schultz wrote:
&lt;br&gt;&amp;gt;&amp;gt; I like re-coding into SimpleDataFormat better.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; D'oh: that's not possible because DateFormat doesn't expose the pattern
&lt;br&gt;&amp;gt; it's using, so I'll have to return something unrelated. Hmm. I'm not a
&lt;br&gt;&amp;gt; big fan of NULL but it's also not exactly consistent with the API if an
&lt;br&gt;&amp;gt; error message is returned.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any ideas other than NULL?
&lt;/div&gt;&lt;br&gt;Not really, because a) it's unlikely to ever occur in practice and b)
&lt;br&gt;that's the traditional VelocityTools response to bad inputs. &amp;nbsp;If you
&lt;br&gt;call $date.toLocalizedPattern($invalidInput) then that's little better
&lt;br&gt;than $date.noSuchMethod($validinput). &amp;nbsp;Either way, part of the
&lt;br&gt;reference is invalid, and we want to render it as an invalid
&lt;br&gt;reference. &amp;nbsp;Returning null accomplishes that.
&lt;br&gt;&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; -chris
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26118944&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26118944&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-tools--Adding-localization-method-to-DateTool-tp26102216p26118944.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26114857</id>
	<title>Re: [tools] Adding localization method to DateTool</title>
	<published>2009-10-29T08:06:30Z</published>
	<updated>2009-10-29T08:06:30Z</updated>
	<author>
		<name>Christopher Schultz-2</name>
	</author>
	<content type="html">Nathan,
&lt;br&gt;&lt;br&gt;On 10/29/2009 11:02 AM, Christopher Schultz wrote:
&lt;br&gt;&amp;gt; I like re-coding into SimpleDataFormat better.
&lt;br&gt;&lt;br&gt;D'oh: that's not possible because DateFormat doesn't expose the pattern
&lt;br&gt;it's using, so I'll have to return something unrelated. Hmm. I'm not a
&lt;br&gt;big fan of NULL but it's also not exactly consistent with the API if an
&lt;br&gt;error message is returned.
&lt;br&gt;&lt;br&gt;Any ideas other than NULL?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;-chris
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (268 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26114857/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-tools--Adding-localization-method-to-DateTool-tp26102216p26114857.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26114770</id>
	<title>Re: [tools] Adding localization method to DateTool</title>
	<published>2009-10-29T08:02:07Z</published>
	<updated>2009-10-29T08:02:07Z</updated>
	<author>
		<name>Christopher Schultz-2</name>
	</author>
	<content type="html">Nathan,
&lt;br&gt;&lt;br&gt;On 10/29/2009 10:36 AM, Nathan Bubna wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return df.toLocalizedPattern();
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I believe you'll have to cast to (SimpleDateFormat) to get the
&lt;br&gt;&amp;gt; toLocalizedPattern() method.
&lt;br&gt;&lt;br&gt;Yup, I noticed that as I started to write the code. For now, I just have
&lt;br&gt;it allowing a ClassCastException. I wasn't sure what to do if the
&lt;br&gt;DateFormat returned wasn't a SimpleDateFormat. I suppose I could always
&lt;br&gt;re-code whatever DateFormat comes back into a SimpleDateFormat and use
&lt;br&gt;that. That ought to always work, even if it ends up being a bit slow.
&lt;br&gt;&lt;br&gt;&amp;gt; In practice, such a cast should always
&lt;br&gt;&amp;gt; work, but i don't trust that. &amp;nbsp;So, perhaps cast, but try/catch any
&lt;br&gt;&amp;gt; ClassCastException and return null (or attempt your original plan in
&lt;br&gt;&amp;gt; such cases.
&lt;br&gt;&lt;br&gt;I like re-coding into SimpleDataFormat better.
&lt;br&gt;&lt;br&gt;I'm working on unit tests right now and everything looks good, including
&lt;br&gt;the use of special formats such as 'short_time' and stuff like that.
&lt;br&gt;&lt;br&gt;I'll also fix the direct-access of the 'timezone' member when I'm
&lt;br&gt;finished with this.
&lt;br&gt;&lt;br&gt;-chris
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (268 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26114770/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-tools--Adding-localization-method-to-DateTool-tp26102216p26114770.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26114315</id>
	<title>Re: [tools] Adding localization method to DateTool</title>
	<published>2009-10-29T07:36:33Z</published>
	<updated>2009-10-29T07:36:33Z</updated>
	<author>
		<name>Nathan Bubna</name>
	</author>
	<content type="html">On Thu, Oct 29, 2009 at 7:27 AM, Christopher Schultz
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26114315&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;chris@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; All,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 10/28/2009 5:10 PM, Christopher Schultz wrote:
&lt;br&gt;&amp;gt;&amp;gt;   public String toLocalizedPattern(String dateFormat,
&lt;br&gt;&amp;gt;&amp;gt;                                    Locale targetLocale)
&lt;br&gt;&amp;gt;&amp;gt;   {
&lt;br&gt;&amp;gt;&amp;gt;     new SimpleDateFormat(formatPattern,
&lt;br&gt;&amp;gt; targetLocale).toLocalizedPattern();
&lt;br&gt;&amp;gt;&amp;gt;   }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; After looking at DateTool, I'm thinking that I should probably write
&lt;br&gt;&amp;gt; this method as:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;   public String toLocalizedPattern(String dateFormat,
&lt;br&gt;&amp;gt;                                    Locale targetLocale)
&lt;br&gt;&amp;gt;   {
&lt;br&gt;&amp;gt;        DateFormat df = getDateFormat(dateFormat,
&lt;br&gt;&amp;gt;                                      targetLocale,
&lt;br&gt;&amp;gt;                                      getTimeZone());
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;        return df.toLocalizedPattern();
&lt;br&gt;&amp;gt;   }
&lt;/div&gt;&lt;br&gt;I believe you'll have to cast to (SimpleDateFormat) to get the
&lt;br&gt;toLocalizedPattern() method. &amp;nbsp;In practice, such a cast should always
&lt;br&gt;work, but i don't trust that. &amp;nbsp;So, perhaps cast, but try/catch any
&lt;br&gt;ClassCastException and return null (or attempt your original plan in
&lt;br&gt;such cases.
&lt;br&gt;&lt;br&gt;&amp;gt; Using the getDateFormat will allow date formats such as &amp;quot;short&amp;quot; and
&lt;br&gt;&amp;gt; &amp;quot;short_date&amp;quot; and stuff like that, and will be more consistent with the
&lt;br&gt;&amp;gt; rest of the DateTool API.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Any comments?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Also, I noticed that some methods explicitly use this.getTimeZone() and
&lt;br&gt;&amp;gt; others reference the private member directly.
&lt;br&gt;&lt;br&gt;that's probably an error that should be fixed. &amp;nbsp;i can't think of why
&lt;br&gt;any methods but the setters and getters should use the member.
&lt;br&gt;&lt;br&gt;&amp;gt; Technically, DateUtil does
&lt;br&gt;&amp;gt; have a subclass (ComparisonDateTool) so it should always use getTimeZone
&lt;br&gt;&amp;gt; in case the subclass wishes to override it. On the other hand, this
&lt;br&gt;&amp;gt; class is not /really/ meant for subclassing and so direct member access
&lt;br&gt;&amp;gt; seems reasonable.
&lt;br&gt;&lt;br&gt;no. it's meant to be subclassable.
&lt;br&gt;&lt;br&gt;&amp;gt; Any comments on this while I'm mucking-around in
&lt;br&gt;&amp;gt; DateTool? (Of course, any changes to other parts of the code will be
&lt;br&gt;&amp;gt; made in a different commit).
&lt;br&gt;&lt;br&gt;thanks. :)
&lt;br&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; -chris
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;---------------------------------------------------------------------
&lt;br&gt;To unsubscribe, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26114315&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-unsubscribe@...&lt;/a&gt;
&lt;br&gt;For additional commands, e-mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26114315&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev-help@...&lt;/a&gt;
&lt;br&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-tools--Adding-localization-method-to-DateTool-tp26102216p26114315.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26114138</id>
	<title>Re: [tools] Adding localization method to DateTool</title>
	<published>2009-10-29T07:27:04Z</published>
	<updated>2009-10-29T07:27:04Z</updated>
	<author>
		<name>Christopher Schultz-2</name>
	</author>
	<content type="html">All,
&lt;br&gt;&lt;br&gt;On 10/28/2009 5:10 PM, Christopher Schultz wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; public String toLocalizedPattern(String dateFormat,
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Locale targetLocale)
&lt;br&gt;&amp;gt; &amp;nbsp; {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; new SimpleDateFormat(formatPattern,
&lt;br&gt;targetLocale).toLocalizedPattern();
&lt;br&gt;&amp;gt; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;After looking at DateTool, I'm thinking that I should probably write
&lt;br&gt;this method as:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;public String toLocalizedPattern(String dateFormat,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Locale targetLocale)
&lt;br&gt;&amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DateFormat df = getDateFormat(dateFormat,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; targetLocale,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; getTimeZone());
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return df.toLocalizedPattern();
&lt;br&gt;&amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;Using the getDateFormat will allow date formats such as &amp;quot;short&amp;quot; and
&lt;br&gt;&amp;quot;short_date&amp;quot; and stuff like that, and will be more consistent with the
&lt;br&gt;rest of the DateTool API.
&lt;br&gt;&lt;br&gt;Any comments?
&lt;br&gt;&lt;br&gt;Also, I noticed that some methods explicitly use this.getTimeZone() and
&lt;br&gt;others reference the private member directly. Technically, DateUtil does
&lt;br&gt;have a subclass (ComparisonDateTool) so it should always use getTimeZone
&lt;br&gt;in case the subclass wishes to override it. On the other hand, this
&lt;br&gt;class is not /really/ meant for subclassing and so direct member access
&lt;br&gt;seems reasonable. Any comments on this while I'm mucking-around in
&lt;br&gt;DateTool? (Of course, any changes to other parts of the code will be
&lt;br&gt;made in a different commit).
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;-chris
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (268 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26114138/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-tools--Adding-localization-method-to-DateTool-tp26102216p26114138.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26113686</id>
	<title>Re: [tools] Adding localization method to DateTool</title>
	<published>2009-10-29T07:02:58Z</published>
	<updated>2009-10-29T07:02:58Z</updated>
	<author>
		<name>Christopher Schultz-2</name>
	</author>
	<content type="html">Nathan,
&lt;br&gt;&lt;br&gt;On 10/28/2009 6:32 PM, Nathan Bubna wrote:
&lt;div class='shrinkable-quote'&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; You've not been forgotten. &amp;nbsp;:) &amp;nbsp;You're correct that this is not
&lt;br&gt;&amp;gt; currently supported. &amp;nbsp;This only adds a simple method to a single
&lt;br&gt;&amp;gt; tool's VTL API and thus would not impede any forthcoming long-wished
&lt;br&gt;&amp;gt; for 2.0 release (at least in my book). &amp;nbsp;Go for it.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; One question, would it make sense to also add a:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; public String toLocalizedPattern(String format) {
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;return toLocalizedPattern(format, getLocale());
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; for completeness? &amp;nbsp;Or is that redundant?
&lt;/div&gt;&lt;/div&gt;After reading everyone's comments, I'm not really sure a second method
&lt;br&gt;is necessary. As Antonio mentions, the server Locale is next to useless,
&lt;br&gt;although tools.xml can be used to define the default locale for
&lt;br&gt;DateTool. For times when you know you want to use the server's Locale
&lt;br&gt;(or the DateTool's Locale), you can easily get that Locale object and
&lt;br&gt;pass it into the two-argument method.
&lt;br&gt;&lt;br&gt;The bottom line is that neither technique (using a custom Locale nor the
&lt;br&gt;server/DateTool Locale) is possible at the moment, and adding a single
&lt;br&gt;method allows them both if desired.
&lt;br&gt;&lt;br&gt;I'm happy to add a second method if there's a lot of support for it,
&lt;br&gt;especially because it's nearly as trivial as the first.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;-chris
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;signature.asc&lt;/strong&gt; (268 bytes) &lt;a href=&quot;http://old.nabble.com/attachment/26113686/0/signature.asc&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-tools--Adding-localization-method-to-DateTool-tp26102216p26113686.html" />
</entry>

</feed>
