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

Allow Filter annotations to be stacked in a third one #4771

Merged
merged 3 commits into from
Jan 7, 2021

Conversation

ggerbaud
Copy link
Contributor

@ggerbaud ggerbaud commented Jan 4, 2021

Fixes #4767

@CLAassistant
Copy link

CLAassistant commented Jan 4, 2021

CLA assistant check
All committers have signed the CLA.

@jameskleeh
Copy link
Contributor

jameskleeh commented Jan 4, 2021

@ggerbaud This needs a test. Should probably live in HttpFilterSpec

@ggerbaud
Copy link
Contributor Author

ggerbaud commented Jan 5, 2021

@jameskleeh Ok, so I add some tests and dit the changes on client and server filters

@jameskleeh
Copy link
Contributor

@ggerbaud Appreciate the effort here! I think the test needs to also reflect the original issue, which was the use of multiple annotations on the container annotation.

@ggerbaud
Copy link
Contributor Author

ggerbaud commented Jan 6, 2021

@jameskleeh My issue was related to a use case (grouping multiple filters behind one annotation to simplify thier declaration) but the test illustrated the technical reason (filters were searched only in direct annotations, not through stereotypes).
But I add more tests to illustrate all of this.

I also add tests with two annotations filters directly on the client.
Note that in this case, annotation declaration order matters because the clients are the same except for filters. If they have the same first filter, they end up with the same key, due to this line.

@jameskleeh jameskleeh added this to the 2.2.4 milestone Jan 7, 2021
@jameskleeh
Copy link
Contributor

Thank you for your contribution!

@jameskleeh jameskleeh merged commit deb4596 into micronaut-projects:2.2.x Jan 7, 2021
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.

Filter Annotations cannot be stacked on @Client (at least for HttpClientFilter)
3 participants