[ https://issues.apache.org/jira/browse/THRIFT-4657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16673947#comment-16673947 ]
ASF GitHub Bot commented on THRIFT-4657: ---------------------------------------- dcelasun closed pull request #1619: THRIFT-4657: Include @javax.annotation.Generated annotation for unions URL: https://github.com/apache/thrift/pull/1619 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/compiler/cpp/src/thrift/generate/t_java_generator.cc b/compiler/cpp/src/thrift/generate/t_java_generator.cc index 67b41770a5..4780dc76cd 100644 --- a/compiler/cpp/src/thrift/generate/t_java_generator.cc +++ b/compiler/cpp/src/thrift/generate/t_java_generator.cc @@ -827,6 +827,10 @@ void t_java_generator::generate_java_union(t_struct* tstruct) { bool is_final = (tstruct->annotations_.find("final") != tstruct->annotations_.end()); bool is_deprecated = this->is_deprecated(tstruct->annotations_); + if (!suppress_generated_annotations_) { + generate_javax_generated_annotation(f_struct); + } + if (is_deprecated) { indent(f_struct) << "@Deprecated" << endl; } ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Include @javax.annotation.Generated annotations for generated Java union > classes > -------------------------------------------------------------------------------- > > Key: THRIFT-4657 > URL: https://issues.apache.org/jira/browse/THRIFT-4657 > Project: Thrift > Issue Type: New Feature > Components: Java - Compiler > Reporter: Manu Sridharan > Priority: Major > > Currently when generating unions, the Java compiler does not include the > javax.annotation.Generated annotation on the generated class, so it is not > properly marked as generated code for other tools. This is easy to fix; > GitHub PR coming up. -- This message was sent by Atlassian JIRA (v7.6.3#76005)