Skip to content

Fix AOT code generation for autowired inner class constructor - #34974

Closed
nosan wants to merge 1 commit into
spring-projects:mainfrom
nosan:34973
Closed

nosan wants to merge 1 commit into
spring-projects:mainfrom
nosan:34973

Conversation

@nosan

@nosan nosan commented May 31, 2025

Copy link
Copy Markdown
Contributor

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

sbrannen commented Jun 2, 2025 •

Copy link
Copy Markdown
Member

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