Re: "While"-like structure in Velocity?

Christopher Schultz <[email protected]>
Newsgroups gmane.comp.jakarta.velocity.user
Message-ID <[email protected]>
Claude,

On 5/15/13 1:40 PM, Claude Brisson wrote:
>> #foreach would be the way to do it if the queue didn't have to be
>> modified, but I'll get an exception if I try to traverse an iterator
>> over the queue and then modify it mid-flight.
> 
> Even if the queue is materialized by a linked list rather than by an
> array? #foreach over a linked list is the way to go, I think.

I think the iterator will bomb as soon as I mutate the queue with
ConcurrentModificationException, no?

-chris
signature.asc (application/pgp-signature, 946 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJRlPmyAAoJEBzwKT+lPKRYrhEQAL4QdaadoD0HNmy3sgsp9qZs
2LLUkileeF0MqmpbGVA3XbeDclZnQO6s3EiUuCS114CTZ73q74ClwTVNQLhbykhv
wHwwXOC5r3+0WoW3rFP4tQCgy+J23k/BY/PAG0Qr0gH3mxzBd92mHwyaL9vx6kK3
r9hsnCITb131iy0KyPiDLEGixOa/UmyPU1iYHmoPBx/P9hkyKlRXj5ZRvQfspE5W
KXIqaVTsb/cbWQytejusny8UNM9OElRdslbA1yb7HNGre4l82jNoFxpCK19hxHYZ
UjpR0Bq/qJRjF7YZIBZrtb1xJpC5jiQb1K0IN7drV9nQE0+4/BZKqT1Il2lf4LoA
FYn0VOsfDPzoO4KByR2BYZT0R1E/IgmqgHHnppDYpyxYf9OC1DQfNt1/OScyKruW
xYD5KoFUEIwX+In9W+Nu3OFEtQ9iYyfoZNnmXwwfZyVuXpefcfwlW5vte9VtzBz4
BMRPL3PcPVPDUJmJ9zMnLmoMkVRXW6cvocUZHrNUytpHiBoziZb/bEsZP7BcCvUT
kmFQRfw7PSEUjQrXEGWBU7ZLNisWe+nYKkZzPL4qlaZznzkj3qkMw0lurWAUajbc
P1/JVkKr/Ntc3YnKIDfveSFw7blEPJvAcr9LxhxeVQ/IuwGYKMfcxBZtccGqoYyy
wNYkgGay8LEA8s4lV8Qh
=TPMm
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.