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

Create well-known non-interface types in CollectionFactory without using reflection #28718

Closed
wilkinsona opened this issue Jun 28, 2022 · 2 comments
Assignees
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement
Milestone

Comments

@wilkinsona
Copy link
Member

Affects: 6.0

As discussed with @sdeleuze, it would be useful for native images if CollectionFactory could create instances of well-known non-interface collection types without using reflection. Aligning with the types that the factory creates for different interfaces, these well-known implementations could be LinkedHashSet, TreeSet, and ArrayList. Similar changes could be made for map creation as well.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 28, 2022
@jhoeller
Copy link
Contributor

We effectively do that for well-known interfaces types already but somehow missed to check for the corresponding implementation classes as well. I might revisit this for 5.3.x even since it's a generally worthwhile optimization.

@jhoeller jhoeller self-assigned this Jun 28, 2022
@jhoeller jhoeller 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 Jun 28, 2022
@jhoeller jhoeller added this to the 5.3.22 milestone Jun 28, 2022
@sbrannen
Copy link
Member

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

No branches or pull requests

4 participants