Skip to content

Support value classes in @ModelAttribute binding#36632

Open
wwan13 wants to merge 1 commit intospring-projects:mainfrom
wwan13:fix/model-attribute-value-class-binding
Open

Support value classes in @ModelAttribute binding#36632
wwan13 wants to merge 1 commit intospring-projects:mainfrom
wwan13:fix/model-attribute-value-class-binding

Conversation

@wwan13
Copy link
Copy Markdown

@wwan13 wwan13 commented Apr 9, 2026

Closes gh-36183

Support Kotlin @JvmInline value classes in@ModelAttribute constructor binding.

This change adapts bound values to Kotlin inline classes during binding, avoids re-boxing values already adapted during binding, and treats inline classes as scalar constructor arguments rather than nested constructor-bound objects.

Tests are added for DataBinder andModelAttributeMethodProcessor.

Support Kotlin `@JvmInline` value classes in
`@ModelAttribute` constructor binding.

Closes spring-projectsgh-36183

Signed-off-by: wwan13 <wwan13@naver.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged or decided on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Illegal arguments for constructor when kotlin value class used as param in ModelAttribute

2 participants