-
Notifications
You must be signed in to change notification settings - Fork 812
Fix cascading deserialization Spring Data's Page by setting @JsonIgnoreProperties(ignoreUnknown = true) #653
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
Conversation
9bb2dd1
to
38623a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, now the deserialization won't fail with unknown properties, so we may rollback SimplePageImpl.getTotalPages()
and some methods to @JsonProperty
, since v3.0.6 is a patch release and should not have any breaking changes. (The base branch of this PR should be 3.0.x also, to fix 3.0.6 #636 (review))
I've confirmed rollback getTotalPages()
, getNumberOfElements()
, isFirst()
, isLast()
from @JsonIgnore
to @JsonProperty
doesn't break any tests.
Codecov Report
@@ Coverage Diff @@
## main #653 +/- ##
============================================
+ Coverage 79.83% 80.34% +0.50%
- Complexity 545 546 +1
============================================
Files 66 66
Lines 1984 1984
Branches 274 275 +1
============================================
+ Hits 1584 1594 +10
+ Misses 250 242 -8
+ Partials 150 148 -2
|
Hi @OlgaMaciaszek Can you take it to 2021.0.1 and 2020.6 releases ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nkonev Thanks for submitting the fix. In general looks good. However, I've added a comment about a cosmetic issue - please address it. I don't think we're going to release 3.0.x
anymore, but we will be releasing 3.1.x
- could you please submit this against 3.1.x
instead of main
so that we can include it in both release trains.
...n-core/src/test/java/org/springframework/cloud/openfeign/support/PageJacksonModuleTests.java
Outdated
Show resolved
Hide resolved
…reProperties(ignoreUnknown = true), revert ignoring getTotalPages(), getNumberOfElements(), isFirst(), isLast()
6f28ff9
to
b59e597
Compare
Sad to see you're dropping support for |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@OlgaMaciaszek Why was this PR not cherry-picked to v3.0.7? 😭 |
@KENNYSOFT It was my mistake. Was looking for this discussion in issues. Did not realise it was in PRs instead. Will get a |
…reProperties(ignoreUnknown = true), revert ignoring getTotalPages(), getNumberOfElements(), isFirst(), isLast() (#653)
As discussed here #636 (comment)
@KENNYSOFT @OlgaMaciaszek Please review.