You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2023/04/06 11:36:13 UTC

[dubbo] branch 3.2 updated (0ff44d3d75 -> e3053618dd)

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

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


    from 0ff44d3d75 Optimize naming, remove duplicate words (#11969)
     add 03647452d5 triple serialize check (#11984)
     new e3053618dd Merge branch 'apache-3.1' into apache-3.2

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../dubbo/remoting/transport/CodecSupport.java     | 10 +++++++
 .../rpc/protocol/tri/ReflectionPackableMethod.java | 32 ++++++++++++++++++----
 2 files changed, 36 insertions(+), 6 deletions(-)


[dubbo] 01/01: Merge branch 'apache-3.1' into apache-3.2

Posted by al...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e3053618dd1b8f824f862c3d927ef3b69eb587da
Merge: 0ff44d3d75 03647452d5
Author: Albumen Kevin <jh...@gmail.com>
AuthorDate: Thu Apr 6 19:33:34 2023 +0800

    Merge branch 'apache-3.1' into apache-3.2
    
    # Conflicts:
    #       dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/CodecSupport.java
    #       dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/ReflectionPackableMethod.java

 .../dubbo/remoting/transport/CodecSupport.java     | 10 +++++++
 .../rpc/protocol/tri/ReflectionPackableMethod.java | 32 ++++++++++++++++++----
 2 files changed, 36 insertions(+), 6 deletions(-)

diff --cc dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/CodecSupport.java
index 0f0d079927,591c38b862..28c6fe7830
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/CodecSupport.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/CodecSupport.java
@@@ -176,21 -183,12 +176,31 @@@ public class CodecSupport 
  
      }
  
 +    /**
 +     * Is Match
 +     *
 +     * @param url url
 +     * @param id  id
 +     * @return boolean
 +     */
 +    private static boolean isMatch(URL url, Byte id) {
 +        Byte localId;
 +        for (String serialization : UrlUtils.allSerializations(url)) {
 +            localId = SERIALIZATIONNAME_ID_MAP.get(serialization);
 +            if (id.equals(localId)) {
 +                return true;
 +            }
 +        }
 +        return false;
 +    }
+ 
+     public static void checkSerialization(String expectSerializeName, String actualSerializeName)throws IOException {
+         if (expectSerializeName.equals(actualSerializeName)
+             && SERIALIZATIONNAME_ID_MAP.containsKey(expectSerializeName)) {
+             return;
+         }
+         throw new IOException("Unexpected serialization type:" + actualSerializeName + " received from network, please check if the peer send the right id.");
+     }
++
++
  }
diff --cc dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/ReflectionPackableMethod.java
index 5316fc5452,8c52ab8ad1..4e60e34075
--- a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/ReflectionPackableMethod.java
+++ b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/ReflectionPackableMethod.java
@@@ -20,9 -20,10 +20,10 @@@ package org.apache.dubbo.rpc.protocol.t
  import org.apache.dubbo.common.URL;
  import org.apache.dubbo.common.constants.CommonConstants;
  import org.apache.dubbo.common.serialize.MultipleSerialization;
 -import org.apache.dubbo.common.serialize.support.DefaultSerializationSelector;
  import org.apache.dubbo.common.stream.StreamObserver;
  import org.apache.dubbo.config.Constants;
 +import org.apache.dubbo.remoting.utils.UrlUtils;
+ import org.apache.dubbo.remoting.transport.CodecSupport;
  import org.apache.dubbo.rpc.model.MethodDescriptor;
  import org.apache.dubbo.rpc.model.PackableMethod;
  
@@@ -344,7 -344,10 +350,10 @@@ public class ReflectionPackableMethod i
          private final URL url;
          private final Class<?> returnClass;
  
-         private WrapResponseUnpack(MultipleSerialization serialization, URL url, Class<?> returnClass) {
 -        private final String requestSerializeName;
++private final String requestSerializeName;
+ 
+ 
+         private WrapResponseUnpack(MultipleSerialization serialization, URL url, String requestSerializeName, Class<?> returnClass) {
              this.serialization = serialization;
              this.url = url;
              this.returnClass = returnClass;