Skip to content

Optimize array creation in SpEL ConstructorReference#30189

Closed
TAKETODAY wants to merge 1 commit intospring-projects:mainfrom
TAKETODAY:optimize-spel-arrays-creation
Closed

Optimize array creation in SpEL ConstructorReference#30189
TAKETODAY wants to merge 1 commit intospring-projects:mainfrom
TAKETODAY:optimize-spel-arrays-creation

Conversation

@TAKETODAY
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

Thank you

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.

3 participants