-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix duplicate field name serialization with @BsonDiscriminator and getter #1610
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
|
@raffaeleflorio could you include a test case for the issue? |
|
@rozza I've just added the test case. The |
|
@rozza I also added the |
89f904e to
0e7dfd4
Compare
67731e5 to
0b34a9b
Compare
2c7d0d1 to
01c4820
Compare
ba54a86 to
443d36c
Compare
b7b2ec1 to
e8446d6
Compare
a6de0b5 to
3ae1b70
Compare
…ith the roundTrip one
|
Assigned |
rozza
left a comment
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.
A couple of checkstyle nits
bson/src/test/unit/org/bson/codecs/pojo/entities/DiscriminatorWithGetterModel.java
Outdated
Show resolved
Hide resolved
bson/src/test/unit/org/bson/codecs/pojo/entities/DiscriminatorWithProperty.java
Outdated
Show resolved
Hide resolved
|
Looks good - just going to run the CI again then should be able to merge. Thanks @raffaeleflorio |
rozza
left a comment
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! Thank you @raffaeleflorio for the excellent PR.
I'm pleased to say this improvement will be part of the 5.6 release.
Fixes NPE due to BSONIgnore fields introduced in #1610 JAVA-5971 --------- Co-authored-by: Ross Lawley <[email protected]>
Fixes NPE due to BSONIgnore fields introduced in mongodb#1610 JAVA-5971 --------- Co-authored-by: Ross Lawley <[email protected]>
This PR is about the JAVA-5764 issue. It changes the
encodemethod by skipping the encode of a property if it's already encoded as the discriminator.