From: Jake Farrell Date: Tue, 6 Dec 2011 00:48:04 +0000 (+0000) Subject: Thrift-1090: Document the generation of a file called "Constants.java" X-Git-Tag: 0.9.1~518 X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=3775a683af521f15632d0809f56d87b61ba49939;p=common%2Fthrift.git Thrift-1090: Document the generation of a file called "Constants.java" Client: java Patch: Mike Riley Adds program_name to the Constants file in java to match all other client libs. git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1210724 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/compiler/cpp/src/generate/t_java_generator.cc b/compiler/cpp/src/generate/t_java_generator.cc index fa87d094..49f81be4 100644 --- a/compiler/cpp/src/generate/t_java_generator.cc +++ b/compiler/cpp/src/generate/t_java_generator.cc @@ -483,7 +483,7 @@ void t_java_generator::generate_consts(std::vector consts) { return; } - string f_consts_name = package_dir_+"/Constants.java"; + string f_consts_name = package_dir_+ '/' + program_name_ + "Constants.java"; ofstream f_consts; f_consts.open(f_consts_name.c_str()); @@ -494,7 +494,7 @@ void t_java_generator::generate_consts(std::vector consts) { java_type_imports(); f_consts << - "public class Constants {" << endl << + "public class " << program_name_ << "Constants {" << endl << endl; indent_up(); vector::iterator c_iter;