jrhee17 opened a new pull request, #3114: URL: https://github.com/apache/thrift/pull/3114
<!-- Explain the changes in the pull request below: --> https://github.com/apache/thrift/pull/2553 had added the ability to access field annotations in java. In our use-case, we would like to annotate arbitrary types and re-use it without explicitly re-annotating each field. e.g. ``` struct should_mask { } (a = "b") struct struct_1 { 1: should_mask field; } struct struct_2 { 1: should_mask field; } ``` instead of ``` struct should_mask { } struct struct_1 { 1: should_mask field (a = "b") } struct struct_2 { 1: should_mask field (a = "b") } ``` I would like to propose that `FieldMetaData#getFieldAnnotations` returns annotations on types as well to achieve this. Misc1) If it feels safer to hide this change behind an option (i.e. type_annotations_as_metadata_), then I can also make this change Misc2) If it is preferred that type annotations are exposed via a different method, I can make this change as well. Overall, I'm happy if there is a way to access annotations added to types from Java. <!-- We recommend you review the checklist/tips before submitting a pull request. --> - [ ] Did you create an [Apache Jira](https://issues.apache.org/jira/projects/THRIFT/issues/) ticket? ([Request account here](https://selfserve.apache.org/jira-account.html), not required for trivial changes) - [ ] If a ticket exists: Does your pull request title follow the pattern "THRIFT-NNNN: describe my issue"? - [ ] Did you squash your changes to a single commit? (not required, but preferred) - [ ] Did you do your best to avoid breaking changes? If one was needed, did you label the Jira ticket with "Breaking-Change"? - [ ] If your change does not involve any code, include `[skip ci]` anywhere in the commit message to free up build resources. <!-- The Contributing Guide at: https://github.com/apache/thrift/blob/master/CONTRIBUTING.md has more details and tips for committing properly. --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@thrift.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org