[ https://issues.apache.org/jira/browse/THRIFT-2773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14163324#comment-14163324 ]
Hudson commented on THRIFT-2773: -------------------------------- FAILURE: Integrated in Thrift-precommit #23 (See [https://builds.apache.org/job/Thrift-precommit/23/]) THRIFT-2773: java - fixed oneway support while using TServiceClient (hcorg: rev 575ff7d710f115421dd89ac16bb3897c3b01ae37) * lib/java/src/org/apache/thrift/TServiceClient.java * compiler/cpp/src/generate/t_java_generator.cc > Generated Java code for 'oneway' methods is incorrect. > ------------------------------------------------------ > > Key: THRIFT-2773 > URL: https://issues.apache.org/jira/browse/THRIFT-2773 > Project: Thrift > Issue Type: Bug > Components: Java - Compiler, Java - Library > Affects Versions: 1.0 > Environment: Mac OS X > Reporter: Adam Zegelin > > While the ticket THRIFT-2704 (and associated pull request > https://github.com/apache/thrift/pull/216) adds support to Java for 'oneway' > service calls, the changes only apply to the generated AsyncClient. > The synchronous client code calls TServiceClient.sendBase() which always > generates a TMessage of type T_CALL. > {code:title=oneway-test.thrift} > service TestService { > oneway void testFunction(); > } > {code} > {code:title=TestService.java} > public class TestService { > ⋮ > public static class Client extends org.apache.thrift.TServiceClient > implements Iface { > ⋮ > public void send_testFunction() throws org.apache.thrift.TException > { > ⋮ > sendBase("testFunction", args); // note the lack of message type here > } > } > ⋮ > public static class AsyncClient extends > org.apache.thrift.async.TAsyncClient implements AsyncIface { > ⋮ > public static class testFunction_call extends > org.apache.thrift.async.TAsyncMethodCall { > ⋮ > public void write_args(org.apache.thrift.protocol.TProtocol prot) > throws org.apache.thrift.TException { > prot.writeMessageBegin(new > org.apache.thrift.protocol.TMessage("testFunction", > org.apache.thrift.protocol.TMessageType.ONEWAY, 0)); // ONEWAY is specified > correctly > testFunction_args args = new testFunction_args(); > args.write(prot); > prot.writeMessageEnd(); > } > ⋮ > } > } > ⋮ > } > {code} > {code:title=TServiceClient.java} > public abstract class TServiceClient { > ⋮ > protected void sendBase(String methodName, TBase args) throws TException { > oprot_.writeMessageBegin(new TMessage(methodName, TMessageType.CALL, > ++seqid_)); // note hardcoded CALL > ⋮ > } > ⋮ > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)