8000 Fix AOT code generation for autowired inner class constructor by nosan · Pull Request #34974 · spring-projects/spring-framework · GitHub
[go: up one dir, main page]

Skip to content

Fix AOT code generation for autowired inner class constructor #34974

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

Closed
wants to merge 1 commit into from

Conversation

nosan
Copy link
Contributor
@nosan nosan commented May 31, 2025

Fix index calculation in AutowiredArgumentsCodeGenerator for Inner Class

See #34973

@nosan nosan force-pushed the 34973 branch 2 times, most recently from 6047b56 to c0c705f Compare May 31, 2025 11:01
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label May 31, 2025
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
@sbrannen sbrannen added in: core Issues in core modules (aop, beans, core, context, expression) theme: aot An issue related to Ahead-of-time processing status: waiting-for-triage An issue we've not yet triaged or decided on and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 1, 2025
@sbrannen sbrannen changed the title In the Native image, Inner Class Instantiation failed Fix AOT code generation for autowired inner class constructor Jun 1, 2025
@sbrannen sbrannen self-assigned this Jun 1, 2025
@sbrannen sbrannen removed the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 2, 2025
@sbrannen sbrannen added this to the 6.2.8 milestone Jun 2, 2025
@sbrannen sbrannen closed this in c2d6788 Jun 2, 2025
@sbrannen
Copy link
Member
sbrannen commented Jun 2, 2025

Thanks for the PR!

This has been merged into 6.2.x and main.

Since the startIndex is already properly calculated for an inner class in InstanceSupplierCodeGenerator.buildGetInstanceMethodForConstructor(...), there is indeed no need to adjust the argument indexes within AutowiredArgumentsCodeGenerator.generateCode(...), and I updated the commit message to reflect that: c2d6788

@nosan nosan deleted the 34973 branch June 2, 2025 08:56
@sbrannen sbrannen added the type: bug A general bug label Jun 2, 2025
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) theme: aot An issue related to Ahead-of-time processing type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0