Skip to content

Fix failed introspection for duplicated properties#12358

Open
davidsonnabend wants to merge 3 commits intomicronaut-projects:4.10.xfrom
davidsonnabend:12262-fix-duplicated-property-introspection
Open

Fix failed introspection for duplicated properties#12358
davidsonnabend wants to merge 3 commits intomicronaut-projects:4.10.xfrom
davidsonnabend:12262-fix-duplicated-property-introspection

Conversation

@davidsonnabend
Copy link

Initial fix for #12262.

I’m curious if you think this is the best path forward or if you’d prefer a different implementation.

Please let me know if anything can be improved or needs to be solved differently.

@davidsonnabend davidsonnabend changed the title Fix failed introspection for duplicated properties #12262 Fix failed introspection for duplicated properties Jan 19, 2026
@dstepanov
Copy link
Contributor

I think the correct way is to fix it on AstBeanPropertiesUtils#resolveBeanProperties. Please also check setting/getting value works.

@davidsonnabend
Copy link
Author

I think I found the root cause. AstBeanPropertiesUtils isn't involved for this specific case.

The problem is that KSPropertyDeclaration::findOverridee() always returns the first declared interface. Thus, the check for overridden properties only works for the first interface (A::foo). The same property of the second interface (B::foo) is considered as a new property. This results in the list of duplicated properties and the described bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants