Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

THRIFT-734. java: Can't use primitive types in service definitions fo…

…r bean generated code

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@923566 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit 3f4ca0e8fd63ed0fde1a5a00097144384436f9b2 1 parent 5f013bb
Bryan Duxbury authored
2  compiler/cpp/src/generate/t_java_generator.cc
@@ -2313,7 +2313,7 @@ void t_java_generator::generate_service_client(t_service* tservice) {
2313 2313
2314 2314 for (fld_iter = fields.begin(); fld_iter != fields.end(); ++fld_iter) {
2315 2315 f_service_ <<
2316   - indent() << "args." << (*fld_iter)->get_name() << " = " << (*fld_iter)->get_name() << ";" << endl;
  2316 + indent() << "args.set" << get_cap_name((*fld_iter)->get_name()) << "(" << (*fld_iter)->get_name() << ");" << endl;
2317 2317 }
2318 2318
2319 2319 f_service_ <<
5 test/JavaBeansTest.thrift
@@ -32,3 +32,8 @@ struct OneOfEachBeans {
32 32 10: list<i16> i16_list,
33 33 11: list<i64> i64_list
34 34 }
  35 +
  36 +
  37 +service Service {
  38 + i64 mymethod(i64 blah);
  39 +}

0 comments on commit 3f4ca0e

Please sign in to comment.
Something went wrong with that request. Please try again.