shuyangzhou/liferay-portal — pull request #61 by matthewkong (2012-03-05 20:22:42+00:00)
Title: LPS-25892 Exception when undeploying some portlets

Hey Shuyang, Hugo told me to send you this first since it might be some performance thing? Anyways, I was searching google and it seems like using a for loop is faster than using the iterator:
http://www.coderanch.com/t/202801/Performance/java/ArrayList-iterator-faster-than-looping

And it seems like it can handle any type of lists. The current problem being CopyOnWriteArrayList because the iterator for this doesn't support remove.

Just wanted to check if using this for loop will hurt performance rather than using the iterator. If it does, we can just do a instanceof check or something like that. Either way, I don't think we use remove in many places and the lists aren't big enough for this to make any meaningful impact.