XiaoFeiASK commented on code in PR #3618:
URL: https://github.com/apache/dubbo-go/pull/3618#discussion_r3763792796


##########
filter/generic/filter.go:
##########
@@ -197,10 +197,7 @@ func (f *genericFilter) OnResponse(_ context.Context, res 
result.Result, invoker
                return res
        }
 
-       // Check if data is a map type that needs to be deserialized
-       dataValue := reflect.ValueOf(data)
-       if dataValue.Kind() != reflect.Map && dataValue.Kind() != reflect.Slice 
{
-               // If data is not a map or slice, it's already a primitive 
type, no need to deserialize
+       if !shouldRealizeTypedResult(data, generic) {

Review Comment:
   done



##########
filter/generic/service.go:
##########
@@ -79,19 +102,19 @@ func (s *GenericService) InvokeWithType(ctx 
context.Context, methodName string,
                return nil
        }
 
-       // Get the element type that the pointer points to
        replyType := replyValue.Elem().Type()
-
-       // Use MapGeneralizer to realize the map result to the target struct
-       g := generalizer.GetMapGeneralizer()
        realized, err := realizeResult(result, replyType, g)

Review Comment:
   done



-- 
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