-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Use more specific AssertJ MapAssert for return of JsonContentAssert#extractingJsonPathMapValue #9675
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
Use more specific AssertJ MapAssert for return of JsonContentAssert#extractingJsonPathMapValue #9675
Conversation
|
@mihhail-lapushkin Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
|
@mihhail-lapushkin Thank you for signing the Contributor License Agreement! |
|
Thanks for the PR. No worries about the commit message, we'll fix that when we merge. |
|
@philwebb I don't know your policy on this things, but I would propose that you align the returns of AssertJ with the returns of the |
|
Thanks @filiphr, no need for a new ticket as it's all related to the same underlying issue. @mihhail-lapushkin if you're able to update the PR with the addition methods, that would be fantastic. Otherwise we'll do it when we merge. |
|
Fixed |
|
I think that the others are OK. Theoretically what could be done if it is needed on spring boot side is to have a test that will check the signatures between |
Previously, JsonContentAssert returns AbstractMapAssert from extractingJsonPathMapValue. This could lead to type safety warnings when calling one of the assert's methods with a generic varargs parameter such as contains(Entry<? extends Object, ? extends Object>...). This commit replaces the use of both AbstractMapAssert and AbstractListAssert with MapAssert and ListAssert respectively. These classes use final methods and @SafeVargs args to prevent the above-described problem from occurring. See gh-9675
* gh-9675: Polish "Fix JsonContentAssert type safety warnings" Fix JsonContentAssert type safety warnings
|
Thanks very much for the PR, @mihhail-lapushkin. I've merged it into 1.5.x and master with some minor polishing. |
Fixed this: #9650
[ sorry for typo in the commit message :( ]