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

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


The following commit(s) were added to refs/heads/master by this push:
     new 16f1fad  fix useless null check in RmiProtocol (#5567)
16f1fad is described below

commit 16f1fad340a88571f85c26b3f028f30c2d5ad62e
Author: withthewind <[email protected]>
AuthorDate: Tue Dec 31 16:08:47 2019 +0800

    fix useless null check in RmiProtocol (#5567)
---
 .../main/java/org/apache/dubbo/rpc/protocol/rmi/RmiProtocol.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/dubbo-rpc/dubbo-rpc-rmi/src/main/java/org/apache/dubbo/rpc/protocol/rmi/RmiProtocol.java
 
b/dubbo-rpc/dubbo-rpc-rmi/src/main/java/org/apache/dubbo/rpc/protocol/rmi/RmiProtocol.java
index 906048e..325064f 100644
--- 
a/dubbo-rpc/dubbo-rpc-rmi/src/main/java/org/apache/dubbo/rpc/protocol/rmi/RmiProtocol.java
+++ 
b/dubbo-rpc/dubbo-rpc-rmi/src/main/java/org/apache/dubbo/rpc/protocol/rmi/RmiProtocol.java
@@ -86,17 +86,17 @@ public class RmiProtocol extends AbstractProxyProtocol {
           3. if the provider version is lower than v2.6.3, does not use 
customized RemoteInvocation.
          */
         if (isRelease270OrHigher(url.getParameter(RELEASE_KEY))) {
-            rmiProxyFactoryBean.setRemoteInvocationFactory((methodInvocation) 
-> {
+            rmiProxyFactoryBean.setRemoteInvocationFactory(methodInvocation -> 
{
                 RemoteInvocation invocation = new 
RmiRemoteInvocation(methodInvocation);
-                if (invocation != null && isGeneric) {
+                if (isGeneric) {
                     invocation.addAttribute(GENERIC_KEY, generic);
                 }
                 return invocation;
             });
         } else if (isRelease263OrHigher(url.getParameter(DUBBO_VERSION_KEY))) {
-            rmiProxyFactoryBean.setRemoteInvocationFactory((methodInvocation) 
-> {
+            rmiProxyFactoryBean.setRemoteInvocationFactory(methodInvocation -> 
{
                 RemoteInvocation invocation = new 
com.alibaba.dubbo.rpc.protocol.rmi.RmiRemoteInvocation(methodInvocation);
-                if (invocation != null && isGeneric) {
+                if (isGeneric) {
                     invocation.addAttribute(GENERIC_KEY, generic);
                 }
                 return invocation;

Reply via email to