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

Optimize array creation in SpEL ConstructorReference #30189

Closed
wants to merge 1 commit into from
Closed

Optimize array creation in SpEL ConstructorReference #30189

wants to merge 1 commit into from

Conversation

TAKETODAY
Copy link
Contributor

@TAKETODAY TAKETODAY commented Mar 25, 2023

  • Create primitive arrays directly instead of using Array#newInstance
  • Replace if-else blocks with enhanced switch statement

Remove Arrays of primitive types that were originally created using Array#newInstance
Replace if-else with switch case
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Mar 25, 2023
@sbrannen sbrannen changed the title Optimize SpEL ConstructorReference arrays creation Optimize array creation in SpEL ConstructorReference Mar 25, 2023
@sbrannen sbrannen self-assigned this Mar 25, 2023
@sbrannen sbrannen added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Mar 25, 2023
@sbrannen sbrannen added this to the 6.0.8 milestone Mar 25, 2023
sbrannen added a commit to sbrannen/spring-framework that referenced this pull request Mar 27, 2023
@sbrannen sbrannen closed this in 47aca90 Mar 27, 2023
@sbrannen
Copy link
Member

This has been merged into main in 47aca90 and slightly revised in 0c0cda9.

The code is much cleaner now. 👍

Thanks!


p.s. please note that we only include full names in @author tags.

@TAKETODAY
Copy link
Contributor Author

Thank you

mdeinum pushed a commit to mdeinum/spring-framework that referenced this pull request Jun 29, 2023
- Create primitive arrays directly instead of using Array#newInstance.

- Replace if-else blocks with enhanced switch statement.

Closes spring-projectsgh-30189
mdeinum pushed a commit to mdeinum/spring-framework that referenced this pull request Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants