Skip to content

Optimize ArrayList allocations#3233

Merged
cppwfs merged 2 commits intospring-projects:mainfrom
artembilan:Optimize_ArrayList_allocations
Nov 13, 2025
Merged

Optimize ArrayList allocations#3233
cppwfs merged 2 commits intospring-projects:mainfrom
artembilan:Optimize_ArrayList_allocations

Conversation

@artembilan
Copy link
Copy Markdown
Member

Fix new ArrayList() calls with explicit size or collection copy whenever it is possible or reasonable

Fix `new ArrayList()` calls with explicit size or collection copy
whenever it is possible or reasonable
@artembilan artembilan added this to the 4.0.0 milestone Nov 12, 2025
@artembilan artembilan requested a review from cppwfs November 12, 2025 16:17
@artembilan
Copy link
Copy Markdown
Member Author

More info in: spring-projects/spring-kafka#4152

Copy link
Copy Markdown
Contributor

@cppwfs cppwfs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great optimization. One nitpick


/**
* @return The target object to delegate message listening to.
* @return The target objects to delegate a message listening to.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think object (single) is proper here.

@cppwfs cppwfs merged commit 5d62827 into spring-projects:main Nov 13, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants