Code Review
/
common
/
thrift.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
87e9ac6
)
Don't generate a constants file if there are no constants (Java only).
author
David Reiss
<dreiss@apache.org>
Tue, 10 Jun 2008 22:56:43 +0000
(22:56 +0000)
committer
David Reiss
<dreiss@apache.org>
Tue, 10 Jun 2008 22:56:43 +0000
(22:56 +0000)
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666372
13f79535
-47bb-0310-9956-
ffa450edef68
compiler/cpp/src/generate/t_java_generator.cc
patch
|
blob
|
history
diff --git
a/compiler/cpp/src/generate/t_java_generator.cc
b/compiler/cpp/src/generate/t_java_generator.cc
index
6268adf
..
0c0f287
100644
(file)
--- a/
compiler/cpp/src/generate/t_java_generator.cc
+++ b/
compiler/cpp/src/generate/t_java_generator.cc
@@
-315,6
+315,10
@@
void t_java_generator::generate_enum(t_enum* tenum) {
* Generates a class that holds all the constants.
*/
void t_java_generator::generate_consts(std::vector<t_const*> consts) {
+ if (consts.empty()) {
+ return;
+ }
+
string f_consts_name = package_dir_+"/Constants.java";
ofstream f_consts;
f_consts.open(f_consts_name.c_str());