velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob.mcl...@verizon.com
Subject problem with #foreach
Date Wed, 07 May 2003 17:29:45 GMT
I encountered a #foreach in a template that was like a for loop:
      #foreach ($i in [0 .. $foo.size() -  1 ] )

The problem is when foo.size() == 0, I would expect that the loop would
fall through since 0 > -1.
However, it went into a loop, causing a Velocity exception (trying to do a
.get()).  Is this a known bug?

Regards,
Rob



---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message