Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Refactor doGetBeanNamesForType for improved readability and performance #35503

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

Open
polyglot-k wants to merge 7 commits into spring-projects:main
base: main
Choose a base branch
Loading
from polyglot-k:main

Conversation

Copy link
Contributor

@polyglot-k polyglot-k commented Sep 18, 2025
edited
Loading

PR Description:

This pull request refactors the logic for collecting bean names by type in DefaultListableBeanFactory to improve readability and maintainability. The main change is splitting the logic into two helper methods: one for processing bean definitions and another for processing manually registered singletons. This makes the code easier to follow and maintain, without altering its functionality.

Refactoring and code organization:

  • Extracted the core logic for collecting bean names into two new private methods: processBeanDefinitions (handles bean definitions) and processManualSingletons (handles manually registered singletons), improving separation of concerns and code readability.
  • Simplified and clarified the logic for skipping aliases, handling abstract and lazy beans, and checking type matches within the new helper methods.

Error handling improvements:

  • Improved exception handling by consolidating catch blocks and adding more descriptive logging when bean class loading or metadata resolution fails.

Note

This helps with hot path configuration at the jit computer level.

Thank you for reviewing this PR! Your feedback is highly appreciated.

...iew of the jit compilor
Signed-off-by: KNU-K <knukang334@gmail.com>
Signed-off-by: KNU-K <knukang334@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
status: waiting-for-triage An issue we've not yet triaged or decided on
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /