Fixes Map Based Parameter Checking for Generic Subclasses#689
Merged
velo merged 1 commit intoApr 30, 2018
Merged
Conversation
Fixes OpenFeign#665 When verifying that any of th `@*Map` annotations are in fact `Map` instances, we were assumping that all values are direct extension of a `Map` with generic type information intact. When using frameworks like Spring, it is possible to have `Map` objects that do not expose type information, like `HttpHeaders`, which directly extend from a `Map` with the type information static. This added additional checking to the `checkMapKeys` function to accomodate for `Map` subclasses without type information. If the map key information cannot be validated, we simply pass it through.
Member
Author
|
@velo Is anyone available to review this? |
Member
|
I already did, but forgot to press the button. LGTM |
Contributor
|
@kdavisk6 hi, I saw that you modified this bug, but it has not been released yet. How do our already released versions handle this bug? |
Member
Author
|
This has been released. It is available in version 9.7 @ileler |
Contributor
|
Thx,I am using |
velo
pushed a commit
that referenced
this pull request
Oct 7, 2024
Fixes #665 When verifying that any of th `@*Map` annotations are in fact `Map` instances, we were assumping that all values are direct extension of a `Map` with generic type information intact. When using frameworks like Spring, it is possible to have `Map` objects that do not expose type information, like `HttpHeaders`, which directly extend from a `Map` with the type information static. This added additional checking to the `checkMapKeys` function to accomodate for `Map` subclasses without type information. If the map key information cannot be validated, we simply pass it through.
velo
pushed a commit
that referenced
this pull request
Oct 8, 2024
Fixes #665 When verifying that any of th `@*Map` annotations are in fact `Map` instances, we were assumping that all values are direct extension of a `Map` with generic type information intact. When using frameworks like Spring, it is possible to have `Map` objects that do not expose type information, like `HttpHeaders`, which directly extend from a `Map` with the type information static. This added additional checking to the `checkMapKeys` function to accomodate for `Map` subclasses without type information. If the map key information cannot be validated, we simply pass it through.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #655
When verifying that any of the
@*Mapannotations are in factMapinstances, we were assuming that all values are directextension of a
Mapwith generic type information intact. Whenusing frameworks like Spring, it is possible to have
Mapobjectsthat do not expose type information, like
HttpHeaders, whichdirectly extend from a
Mapwith the type information static.This adds additional checking to the
checkMapKeysfunctionto accomodate for
Mapsubclasses without type information. Ifthe map key information cannot be validated, we simply pass it
through.