You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2011/02/16 22:05:35 UTC
Non-resetable iterator warning
All,
I'm using Velocity 1.4 (yeah, I know) and I'm getting these warnings:
> INFO: Velocity [warn] Warning! The iterative is an Iterator in
> the #foreach() loop at [0,0] in template [my template]. Because it's
> not resetable, if used in more than once, this may lead to unexpected
> results.
A couple of questions:
1. Where is the name of the iterator and the correct template location?
I can easily find it in my template - fortunately, I'm only using an
iterator for iteration in one place - but the warning message looks like
it's got a hole in it, and the location (0,0) is clearly wrong.
2. Is there a way to disable this warning? It's filling up my production
log files. I'm intentionally using an Iterator for iteration because I
want to call "remove" on it after processing.
I looked for various configuration keys but couldn't find anything relevant.
Thanks,
-chris
Re: Non-resetable iterator warning
Posted by Nathan Bubna <nb...@gmail.com>.
On Fri, Feb 18, 2011 at 12:53 PM, Christopher Schultz
<ch...@christopherschultz.net> wrote:
...
>> please, if i were omnipotent, i would strike all pre-1.6 versions
>> from existence and force you to upgrade. ;)
>
> If you were omnipotent, I'd ask you to upgrade me and make sure
> everything worked flawlessly :)
and i'd do it with a smile too!
> Seriously, Velocity is something we /really/ want to upgrade. Once I'm
> on the 1.6 track with Velocity and 2.0 track with velocity-tools, I can
> start really being a committer again (or maybe just start being one in
> the first place). It's really tough to work on something you're just not
> using at all for your own work.
i know the feeling.
> Thanks,
> -chris
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org
Re: Non-resetable iterator warning
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Nathan,
On 2/16/2011 5:47 PM, Nathan Bubna wrote:
> all relevant things were fixes for these problems in subsequent
> versions. seriously, i can't remember anything related to this
> except the fixes. tally one for reasons to upgrade.
Gotcha.
> please, if i were omnipotent, i would strike all pre-1.6 versions
> from existence and force you to upgrade. ;)
If you were omnipotent, I'd ask you to upgrade me and make sure
everything worked flawlessly :)
Seriously, Velocity is something we /really/ want to upgrade. Once I'm
on the 1.6 track with Velocity and 2.0 track with velocity-tools, I can
start really being a committer again (or maybe just start being one in
the first place). It's really tough to work on something you're just not
using at all for your own work.
Thanks,
-chris
Re: Non-resetable iterator warning
Posted by Nathan Bubna <nb...@gmail.com>.
On Wed, Feb 16, 2011 at 1:05 PM, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> All,
>
> I'm using Velocity 1.4 (yeah, I know) and I'm getting these warnings:
>
>> INFO: Velocity [warn] Warning! The iterative is an Iterator in
>> the #foreach() loop at [0,0] in template [my template]. Because it's
>> not resetable, if used in more than once, this may lead to unexpected
>> results.
>
> A couple of questions:
>
> 1. Where is the name of the iterator and the correct template location?
> I can easily find it in my template - fortunately, I'm only using an
> iterator for iteration in one place - but the warning message looks like
> it's got a hole in it, and the location (0,0) is clearly wrong.
>
> 2. Is there a way to disable this warning? It's filling up my production
> log files. I'm intentionally using an Iterator for iteration because I
> want to call "remove" on it after processing.
>
> I looked for various configuration keys but couldn't find anything relevant.
all relevant things were fixes for these problems in subsequent
versions. seriously, i can't remember anything related to this except
the fixes. tally one for reasons to upgrade. please, if i were
omnipotent, i would strike all pre-1.6 versions from existence and
force you to upgrade. ;)
> Thanks,
> -chris
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org