Incorrect skeleton code generated for services that extend another service
--------------------------------------------------------------------------

                 Key: THRIFT-1372
                 URL: https://issues.apache.org/jira/browse/THRIFT-1372
             Project: Thrift
          Issue Type: Bug
          Components: C++ - Compiler
    Affects Versions: 0.8
            Reporter: Jens Geyer


service Calculator extends shared.SharedService {
  void ping(),
  i32 add(1:i32 num1, 2:i32 num2),
  i32 calculate(1:i32 logid, 2:Work w) throws (1:InvalidOperation ouch),
  oneway void zip()
}

which extends

service SharedService {
 SharedStruct getStruct(1: i32 key)
}

The generated server skeleton class CalculatorHandler inherits ONLY from 
CalculatorIf, which correctly inherits from SharedServiceIf, and thus the 
CalculatorHandler looks like this (less interesting stuff omitted):

class CalculatorHandler : virtual public CalculatorIf {
public:
 CalculatorHandler();

 void ping();
 int32_t add(const int32_t num1, const int32_t num2);
 int32_t calculate(const int32_t logid, const Work& w);
 void zip();
};

>From my understanding, the class should also implement the getStruct() member. 
>Otherwise the inheritance from SharedService seems not to make much sense. In 
>contrast, the CalculatorNull class inherits the getStruct() member from 
>SharedServiceNull, which is what one would expect.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to