[PERF] Avoid unnecessary AbstractList$Itr instances - do not use
java.util.Collections.emptyList()
--------------------------------------------------------------------------------------------------
Key: MYFACES-3469
URL: https://issues.apache.org/jira/browse/MYFACES-3469
Project: MyFaces Core
Issue Type: Improvement
Reporter: Martin Kočí
Priority: Trivial
java.util.Collections.emptyList() is singleton instance of
java.util.Collections.EmptyList class, but this class inherits from
java.util.AbstractList and creates new garbage iterator
java.util.AbstractList.Itr instance in every foreach loop.
It is better to use own singleton instance (similar as google guava has)
same for java.util.Collections.emptySet()
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira