On 02/04/2011 09:03 AM, Antoine Levy-Lambert wrote:
I did not know that using a final variable for the upper bound of a loop instead of something.size() makes a difference in terms of performance.
Generally the preferred idiom is to use an iterator, which the Java 5 for loop would do if we were not source="1.4". (In the quoted case you are iterating two lists at once so an enhanced for loop would not suffice but Iterator can still be used. In a few other cases the index is needed for another purpose so using an Iterator is less desirable.)
--------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org For additional commands, e-mail: dev-h...@ant.apache.org