EarthChen commented on a change in pull request #8734:
URL: https://github.com/apache/dubbo/pull/8734#discussion_r704901953
##########
File path:
dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TripleClientHandler.java
##########
@@ -75,7 +75,7 @@ public void channelRead(ChannelHandlerContext ctx, Object
msg) throws Exception
private void writeRequest(ChannelHandlerContext ctx, final Request req,
final ChannelPromise promise) {
final RpcInvocation inv = (RpcInvocation) req.getData();
final URL url = inv.getInvoker().getUrl();
- ConsumerModel consumerModel = (ConsumerModel) url.getServiceModel();
+ ConsumerModel consumerModel = inv.getServiceModel() != null ?
(ConsumerModel) inv.getServiceModel() : (ConsumerModel) url.getServiceModel();
Review comment:
If there were no errors in the previous logic, this would not be null
--
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]