-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
[protobuf] Some fields are left null #54
Comments
Correction: the problem must be in writing part, since the message is only 11 bytes when the nested object (testClass.b.d) is set, but 23 bytes when it is not set. |
I have a correction to this now, with minor changes to ProtobufGenerator.java and ByteAccumulator.java. |
Excellent detective work: thank you for the patch & test! I will backport this in 2.8. |
As per notes on PR itself, it would appear that fix does not fix test failure (although naming of test class prevents it from getting run via Maven, hiding the fail). |
Oops, I'll check that today. I ran the test manually from Eclipse while testing the fix. It might be that I didn't test the latter commit manually as I assumed Maven would run the test... |
Yes, there was a stupid bug in the last commit. |
Perfect, thank you! I merged it manually for 2.8 so will close PR but changes are the same. |
Hmmh. I suspect this is related to (or causing) #67, fwtw. Reordering of buffered content, perhaps harmless in some cases. |
I'll check. But if the test fails in 2.8.7, it can't be caused by this
change as it's not in 2.8.7.
On 5 Apr 2017 01:25, "Tatu Saloranta" <[email protected]> wrote:
Hmmh. I suspect this is related to (or causing) #67
<#67>, fwtw.
Reordering of buffered content, perhaps harmless in some cases.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#54 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AQ7zAOlDdKIqGxrbEOqeRfEFt3bQ7eFWks5rssNjgaJpZM4MUDjy>
.
|
Depending on field names and ordering, some fields are at times left out, probably when reading in proto message (since this can be reproduced also by writing the same content with c++ compiled proto interface and reading in with Jackson).
Attached JUnit test case with two ways to work around the problem (JsonPropertyOrder annotation or leaving out a nested object value).
Tested with version 2.8.7 (and same problems in previous versions too, but I haven't run this exact test with any other version).
TestProto.java.txt
The text was updated successfully, but these errors were encountered: