diff --git a/grpc/src/compiler/java_generator.cc b/grpc/src/compiler/java_generator.cc index 929c81a67597ac4ec95579b2dab2c1839882212a..b22d419377648ecdb680e74c30f606119340eb83 100644 --- a/grpc/src/compiler/java_generator.cc +++ b/grpc/src/compiler/java_generator.cc @@ -55,8 +55,7 @@ void GenerateImports(grpc_generator::File* file, vars["filename"] = file->filename(); printer->Print( vars, - "//Generated by flatc compiler (version $flatc_version$) on " __DATE__ - " " __TIME__ " \n"); + "//Generated by flatc compiler (version $flatc_version$)\n"); printer->Print("//If you make any local changes, they will be lost\n"); printer->Print(vars, "//source: $filename$.fbs\n\n"); printer->Print(vars, "package $Package$;\n\n"); @@ -337,12 +336,12 @@ static void PrintMethodFields(Printer* p, VARS& vars, const ServiceDescriptor* service) { p->Print("// Static method descriptors that strictly reflect the proto.\n"); vars["service_name"] = service->name(); - + //set of names of rpc input- and output- types that were already encountered. //this is needed to avoid duplicating type extractor since it's possible that //the same type is used as an input or output type of more than a single RPC method std::set<std::string> encounteredTypes; - + for (int i = 0; i < service->method_count(); ++i) { auto method = service->method(i); vars["arg_in_id"] = to_string((long)2 * i); //trying to make msvc 10 happy @@ -382,7 +381,7 @@ static void PrintMethodFields(Printer* p, VARS& vars, "private static volatile $MethodDescriptor$<$input_type$,\n" " $output_type$> $method_new_field_name$;\n" "\n"); - + if (encounteredTypes.insert(vars["input_type_name"]).second) { vars["extr_type"] = vars["input_type"]; vars["extr_type_name"] = vars["input_type_name"]; @@ -394,7 +393,7 @@ static void PrintMethodFields(Printer* p, VARS& vars, vars["extr_type_name"] = vars["output_type_name"]; PrintTypeExtractor(p, vars); } - + p->Print( vars, "@$ExperimentalApi$(\"https://github.com/grpc/grpc-java/issues/" diff --git a/tests/MyGame/Example/MonsterStorageGrpc.java b/tests/MyGame/Example/MonsterStorageGrpc.java index 2d203e6324cdcc729a667c145d118809e97b682f..4627db8d49e6a5b007493e3d54daa7c9e99d0034 100644 --- a/tests/MyGame/Example/MonsterStorageGrpc.java +++ b/tests/MyGame/Example/MonsterStorageGrpc.java @@ -1,4 +1,4 @@ -//Generated by flatc compiler (version 1.8.0) on Dec 28 2017 10:07:47 +//Generated by flatc compiler (version 1.8.0) //If you make any local changes, they will be lost //source: monster_test.fbs