[perf] ELContextStore.destroyDependents() creates unnecessary 
HashMap$KeyIterator instances
-------------------------------------------------------------------------------------------

                 Key: OWB-637
                 URL: https://issues.apache.org/jira/browse/OWB-637
             Project: OpenWebBeans
          Issue Type: Improvement
         Environment: OWB trunk, 1.1.4-SNAPSHOT
            Reporter: Martin Kočí
            Assignee: Gurkan Erdogdu
            Priority: Trivial


org.apache.webbeans.el.ELContextStore.destroyDependents() creates many 
instances of java.util.HashMap$KeyIterator - it uses directly:

Set<Bean<?>> beans = dependentObjects.keySet();
for(Bean<?> bean : beans)

simple if-check optimize it for situation, when user does not use named 
dependent beans:
if (dependentObjects.size() > 0) {
  Set<Bean<?>> beans = dependentObjects.keySet();
  for(Bean<?> bean : beans)
            


--
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


Reply via email to