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

Default annotation values are not retained in the metadata #3125

Closed
alvarosanchez opened this issue Apr 30, 2020 · 1 comment
Closed

Default annotation values are not retained in the metadata #3125

alvarosanchez opened this issue Apr 30, 2020 · 1 comment
Assignees
Labels
type: bug Something isn't working
Milestone

Comments

@alvarosanchez
Copy link
Member

Given an annotation like:

public @interface CacheInvalidate {
    boolean all() default false;
}

Used without values, like @CacheInvalidate.

When calling AnnotationMetadata::getRequiredValue with "all" and Boolean.class, it throws an exception because there are no default values in the annotation metadata.

image

@alvarosanchez alvarosanchez added this to the 2.0.0.RC1 milestone Apr 30, 2020
alvarosanchez added a commit to micronaut-projects/micronaut-redis that referenced this issue Apr 30, 2020
@graemerocher graemerocher added the type: bug Something isn't working label May 4, 2020
@graemerocher graemerocher self-assigned this May 19, 2020
@graemerocher
Copy link
Contributor

The previous code ended up using reflection hence why it was removed since the approach wouldn't work on GraalVM. I have updated the cache plugin code to note use this method anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants