You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jf...@apache.org on 2011/12/06 01:48:04 UTC
svn commit: r1210724 -
/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc
Author: jfarrell
Date: Tue Dec 6 00:48:04 2011
New Revision: 1210724
URL: http://svn.apache.org/viewvc?rev=1210724&view=rev
Log:
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.
Modified:
thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc
Modified: thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc
URL: http://svn.apache.org/viewvc/thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc?rev=1210724&r1=1210723&r2=1210724&view=diff
==============================================================================
--- thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc (original)
+++ thrift/trunk/compiler/cpp/src/generate/t_java_generator.cc Tue Dec 6 00:48:04 2011
@@ -483,7 +483,7 @@ void t_java_generator::generate_consts(s
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(s
java_type_imports();
f_consts <<
- "public class Constants {" << endl <<
+ "public class " << program_name_ << "Constants {" << endl <<
endl;
indent_up();
vector<t_const*>::iterator c_iter;