Affects Version/s: None
Fix Version/s: None
Environment:myfaces core trunk
loop from java 5:
for (Object object: objects)
creates new instance of AbstractList$Itr, if objects are instance of ArrayList.
Similar situation is with explicit .iterator() call.
In my testcases, it is about ~ 100 000 instances per request/response. Creation itself is cheap, but triggers GC lately.
I suggest to use old index-style for (i = 0; i < childCount; i++) if possible. Are there any rawbacks of index-based iteration?
Children is List and as implementation detail we know that it is instance of ArrayList.