You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/06/26 08:40:13 UTC
[GitHub] [dubbo-go] fangyincheng commented on a change in pull request #1271: Ftr: Add generic invoke for jsonrpc
fangyincheng commented on a change in pull request #1271:
URL: https://github.com/apache/dubbo-go/pull/1271#discussion_r659140309
##########
File path: filter/filter_impl/generic_service_filter.go
##########
@@ -60,39 +59,52 @@ func (ef *GenericServiceFilter) Invoke(ctx context.Context, invoker protocol.Inv
if invocation.MethodName() != constant.GENERIC || len(invocation.Arguments()) != 3 {
return invoker.Invoke(ctx, invocation)
}
+ logger.Debugf("[Generic Service Filter] arguments: %v", invocation.Arguments())
+ logger.Debugf("[Generic Service Filter] attachments: %v", invocation.Attachments())
var (
ok bool
err error
methodName string
- newParams []interface{}
genericKey string
+ newParams []interface{}
argsType []reflect.Type
- oldParams []hessian.Object
+ oldParams []interface{}
)
+ genericKey = invocation.AttachmentsByKey(constant.GENERIC_KEY, constant.GENERIC_SERIALIZATION_DEFAULT)
+ if genericKey == constant.GENERIC_SERIALIZATION_DEFAULT {
+ hessianParams, isAssignSuccess := invocation.Arguments()[2].([]hessian.Object)
+ if !ok {
Review comment:
这个时候ok还没有赋值,有判断的必要吗?
--
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: notifications-unsubscribe@dubbo.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org