Skip to content
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

AnnotationMetadata is empty when we use Optional #10512

Open
altro3 opened this issue Feb 19, 2024 · 2 comments
Open

AnnotationMetadata is empty when we use Optional #10512

altro3 opened this issue Feb 19, 2024 · 2 comments

Comments

@altro3
Copy link
Contributor

altro3 commented Feb 19, 2024

Expected Behavior

See this: micronaut-projects/micronaut-validation#281

Sample class:

@Introspected
class OptionalGetters {

    @Nullable
    @Pattern(regexp = "[a-z]+")
    String alpha

    Optional<String> getAlpha() {
        Optional.ofNullable(alpha)
    }

    void setAlpha(String alpha) {
        this.alpha = alpha
    }
}

When we get beanProperty "alpha" we see this:

изображение

As you see, annotation metadata is empty for this proeprty. Because of it now validation doesn't work for this case

Actual Behaviour

No response

Steps To Reproduce

No response

Environment Information

No response

Example Application

No response

Version

4.3.7

@altro3
Copy link
Contributor Author

altro3 commented Feb 19, 2024

@dstepanov look to this, pls

@dstepanov
Copy link
Contributor

Probably the same issue like micronaut-projects/micronaut-serialization#691 caused by a different getter/setter type

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

No branches or pull requests

2 participants