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: [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]