This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.0 by this push:
     new 23a08d9  Ignore Generic Invoke for Injvm invocation copy (#8986)
23a08d9 is described below

commit 23a08d9263b1a1aa3e368dc9f12cddd0162baecd
Author: Albumen Kevin <[email protected]>
AuthorDate: Fri Oct 8 11:40:15 2021 +0800

    Ignore Generic Invoke for Injvm invocation copy (#8986)
---
 .../org/apache/dubbo/rpc/protocol/injvm/InjvmInvoker.java | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git 
a/dubbo-rpc/dubbo-rpc-injvm/src/main/java/org/apache/dubbo/rpc/protocol/injvm/InjvmInvoker.java
 
b/dubbo-rpc/dubbo-rpc-injvm/src/main/java/org/apache/dubbo/rpc/protocol/injvm/InjvmInvoker.java
index f30cbee..43fbd97 100644
--- 
a/dubbo-rpc/dubbo-rpc-injvm/src/main/java/org/apache/dubbo/rpc/protocol/injvm/InjvmInvoker.java
+++ 
b/dubbo-rpc/dubbo-rpc-injvm/src/main/java/org/apache/dubbo/rpc/protocol/injvm/InjvmInvoker.java
@@ -17,6 +17,7 @@
 package org.apache.dubbo.rpc.protocol.injvm;
 
 import org.apache.dubbo.common.URL;
+import org.apache.dubbo.common.constants.CommonConstants;
 import org.apache.dubbo.common.threadpool.manager.ExecutorRepository;
 import org.apache.dubbo.common.utils.ArrayUtils;
 import org.apache.dubbo.common.utils.ReflectUtils;
@@ -145,7 +146,17 @@ public class InjvmInvoker<T> extends AbstractInvoker<T> {
         if (providerServiceModel == null) {
             return invocation;
         }
-        MethodDescriptor providerMethod = 
providerServiceModel.getServiceModel().getMethod(invocation.getMethodName(), 
desc);
+        String methodName = invocation.getMethodName();
+        if(CommonConstants.$INVOKE.equals(methodName)) {
+            // generic invoke, skip copy arguments
+            RpcInvocation copiedInvocation = new 
RpcInvocation(providerServiceModel, methodName, invocation.getServiceName(), 
invocation.getProtocolServiceKey(),
+                invocation.getParameterTypes(), invocation.getArguments(), new 
HashMap<>(invocation.getObjectAttachments()),
+                invocation.getInvoker(), invocation.getAttributes());
+            copiedInvocation.setInvoker(invoker);
+            return copiedInvocation;
+        }
+
+        MethodDescriptor providerMethod = 
providerServiceModel.getServiceModel().getMethod(methodName, desc);
         Object[] realArgument = null;
         if (providerMethod != null) {
             Class<?>[] pts = providerMethod.getParameterClasses();
@@ -166,7 +177,7 @@ public class InjvmInvoker<T> extends AbstractInvoker<T> {
                     realArgument = args;
                 }
 
-                RpcInvocation copiedInvocation = new 
RpcInvocation(providerServiceModel, invocation.getMethodName(), 
invocation.getServiceName(), invocation.getProtocolServiceKey(),
+                RpcInvocation copiedInvocation = new 
RpcInvocation(providerServiceModel, methodName, invocation.getServiceName(), 
invocation.getProtocolServiceKey(),
                     pts, realArgument, new 
HashMap<>(invocation.getObjectAttachments()),
                     invocation.getInvoker(), invocation.getAttributes());
                 copiedInvocation.setInvoker(invoker);

Reply via email to