namelessssssssssss opened a new pull request, #13200:
URL: https://github.com/apache/dubbo/pull/13200

   **The `StubMethodDescriptor` seems to have wrong `returnTypes` when 
initialized.**
   ```Java
      public StubMethodDescriptor(String methodName,
           Class<?> requestClass,
           Class<?> responseClass,
           StubServiceDescriptor serviceDescriptor,
           RpcType rpcType,
           Pack requestPack,
           Pack responsePack,
           UnPack requestUnpack,
           UnPack responseUnpack) {
           this.methodName = methodName;
           this.serviceDescriptor = serviceDescriptor;
           this.rpcType = rpcType;
           this.requestPack = requestPack;
           this.responsePack = responsePack;
           this.responseUnpack = responseUnpack;
           this.requestUnpack = requestUnpack;
           this.parameterClasses = new Class<?>[]{requestClass};
           this.returnClass = responseClass;
           this.paramDesc = ReflectUtils.getDesc(parameterClasses);
           this.compatibleParamSignatures = 
Stream.of(parameterClasses).map(Class::getName).toArray(String[]::new);
          //It this correct?
           this.returnTypes = new Type[]{requestClass, requestClass};
           serviceDescriptor.addMethod(this);
       }
   
   ```
   This problem has no effect if we only use triple protocol, because 
`TripleInvoker` only use param `returnClass` to get method return type. 
   But it may cause a serialization problem when other protocols use protobuf 
serialization with triple stub.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to