You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by js...@apache.org on 2016/07/04 19:37:52 UTC

aurora git commit: Fix thrift t_java_generator.ccc patch.

Repository: aurora
Updated Branches:
  refs/heads/master 43db92962 -> ec712f18f


Fix thrift t_java_generator.ccc patch.

The initial patch inverted logic for emitting `else if` clauses.

Bugs closed: AURORA-1727

Reviewed at https://reviews.apache.org/r/49595/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/ec712f18
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/ec712f18
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/ec712f18

Branch: refs/heads/master
Commit: ec712f18f38a102041ebea31a8e9ac29b7fa4c1d
Parents: 43db929
Author: John Sirois <js...@apache.org>
Authored: Mon Jul 4 13:37:50 2016 -0600
Committer: John Sirois <jo...@gmail.com>
Committed: Mon Jul 4 13:37:50 2016 -0600

----------------------------------------------------------------------
 ...7.compiler.cpp.src.generate.t_java_generator.cc.patch | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/ec712f18/build-support/thrift/AURORA-1727.compiler.cpp.src.generate.t_java_generator.cc.patch
----------------------------------------------------------------------
diff --git a/build-support/thrift/AURORA-1727.compiler.cpp.src.generate.t_java_generator.cc.patch b/build-support/thrift/AURORA-1727.compiler.cpp.src.generate.t_java_generator.cc.patch
index c7ad4bb..42300b4 100644
--- a/build-support/thrift/AURORA-1727.compiler.cpp.src.generate.t_java_generator.cc.patch
+++ b/build-support/thrift/AURORA-1727.compiler.cpp.src.generate.t_java_generator.cc.patch
@@ -1,14 +1,15 @@
---- thrift-0.9.1/compiler/cpp/src/generate/t_java_generator.cc	2016-07-01 12:44:02.556421907 -0600
-+++ thrift-0.9.1/compiler/cpp/src/generate/t_java_generator.cc.fix	2016-07-01 12:41:46.798444685 -0600
-@@ -2827,7 +2827,10 @@
+--- thrift-0.9.1/compiler/cpp/src/generate/t_java_generator.cc	2016-07-04 09:29:35.338735037 -0600
++++ thrift-0.9.1/compiler/cpp/src/generate/t_java_generator.cc.fix	2016-07-04 09:34:46.593500286 -0600
+@@ -2827,7 +2827,11 @@
       bool first = true;
       if (xceptions.size() > 0) {
      	 for (x_iter = xceptions.begin(); x_iter != xceptions.end(); ++x_iter) {
 -    		 first ? first = false : indent(f_service_) << "else ";
 +		 if (first) {
-+			 indent(f_service_) << "else ";
++			first = false;
++		 } else {
++			indent(f_service_) << "else ";
 +		 }
-+    		 first = false;
      		 indent(f_service_) << "if (e instanceof " << type_name((*x_iter)->get_type(), false, false)<<") {" << endl;
      		 indent(f_service_) << indent() << "result." << (*x_iter)->get_name() << " = (" << type_name((*x_iter)->get_type(), false, false) << ") e;" << endl;
      	  	 indent(f_service_) << indent() << "result.set" << get_cap_name((*x_iter)->get_name()) << get_cap_name("isSet") << "(true);" << endl;