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 Class.getDeclaredField()
instead of getField()
when fetching Thrift metadata.
#1729
Conversation
Update: Turns out this is because we use the public static class ping_result implements org.apache.thrift.TBase<ping_result, ping_result._Fields>, java.io.Serializable, Cloneable, Comparable<ping_result> {
// <snip>
public TestException te; // required
// <snip>
} But with |
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.
Thanks for the detailed analysis. Could you remove the new test method since we now know it does not add anything to the test?
thrift/src/test/java/com/linecorp/armeria/server/thrift/ThriftServiceTest.java
Outdated
Show resolved
Hide resolved
This reverts commit 2c5d13d.
Codecov Report
@@ Coverage Diff @@
## master #1729 +/- ##
============================================
+ Coverage 72.86% 72.89% +0.03%
- Complexity 8121 8128 +7
============================================
Files 734 734
Lines 32374 32374
Branches 3980 3980
============================================
+ Hits 23589 23600 +11
+ Misses 6746 6741 -5
+ Partials 2039 2033 -6
Continue to review full report at Codecov.
|
Class.getDeclaredField()
instead of getField()
when fetching Thrift metadata.
@hyangtack Please review. :-) |
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.
Nice catch! 👍
Thanks again, @edgao ! |
thanks for the super quick turnaround! just curious - do you know when the next official release will be? (not a blocker for us since we've built a patched jar) |
Related: #1728
Motivation:
When a user builds a
.thrift
file with theprivate-members
option enabled,Armeria fails to find some fields in the generated code.
Modifications:
Class.getDeclaredField()
instead ofgetField()
.Result: