Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BeanFactoryAnnotationUtils,qualifiedBeanOfType, Inefficient use of keySet iterator. [SPR-12356] #16961

spring-projects-issues opened this issue Oct 20, 2014 · 1 comment
in: core type: enhancement


Copy link

@spring-projects-issues spring-projects-issues commented Oct 20, 2014

Min Ho Pak opened SPR-12356 and commented

BeanFactoryAnnotationUtils,qualifiedBeanOfType method use KeySet Iterator.

It is more efficient to use an iterator on the entrySet of the map, to avoid the Map.get(key) lookup.

pull request:

Affects: 4.1.1

Issue Links:

  • #17037 MessageHeaderAccessor copyHeaders... tuning
  • #16968 org.springframework.ui.ModelMap.mergeAttributes(Map) makes inefficient use of keySet iterator

Referenced from: pull request #667, and commits 2e5d752

Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Oct 21, 2014

Stéphane Nicoll commented

Thanks for the PR. You get a point that in that particular case this is more efficient, especially because we are building a map ourselves and we can guarantee its nature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
in: core type: enhancement
None yet

No branches or pull requests

2 participants