Bean introspection does not have annotation metadata for inherited props (when extending a class from another module) #6574
Labels
lang: groovy
Issues or features specific to Groovy
priority: high
High priority
type: bug
Something isn't working
Milestone
Expected Behavior
Creating an
@Introspected
class by extending another module's@Introspected
class should have annotation metadata for all properties (own + inherited).Actual Behaviour
Only local properties get returned when calling
introspection.getIndexedProperty(AnnotationType)
This seems like a regression in 3.2.0. It was working fine in 3.1.3.
We found this when trying to update and tests started failing - we have controllers with
@Valid @Body
parameters which stopped validating properties inherited from micronaut-security's classes.Interestingly, if the supertype is in the same module - it works fine.
Short gist below, but I've created a sample with a few tests trying to show our findings.
Now, a request like:
will reach the controller, when it should have been rejected, because
username
is null.Steps To Reproduce
@Valid @Body ExtendedCredentials
@Valid
Environment Information
Example Application
https://github.com/mitushy/micronaut-issue-6574
Version
3.2.0
The text was updated successfully, but these errors were encountered: