Fixed missing code from @javax.annotation PR.

https://github.com/google/flatbuffers/pull/4986 missed part of the
implementation.

Change-Id: Ie41771eb018a550c289c77ebe9ef5c50d1ad6751
This commit is contained in:
Wouter van Oortmerssen
2018-11-02 11:40:21 -07:00
parent b6c3d7b899
commit 21591916af
24 changed files with 27 additions and 58 deletions

View File

@@ -221,7 +221,9 @@ class GeneralGenerator : public BaseGenerator {
}
code += lang_.class_annotation;
}
code += lang_.generated_type_annotation;
if (parser_.opts.gen_generated) {
code += lang_.generated_type_annotation;
}
code += classcode;
if (!namespace_name.empty()) code += lang_.namespace_end;
auto filename = NamespaceDir(ns) + defname + lang_.file_extension;