This is an automated email from the ASF dual-hosted git repository. liujun pushed a commit to branch 2.7.0-release in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git
commit 1e1a5ecd99b87ab575b3f5b1d2d9ecbc4183cce8 Author: ken.lj <[email protected]> AuthorDate: Tue Jan 15 14:58:55 2019 +0800 refactor method name --- dubbo-common/src/main/java/org/apache/dubbo/common/Version.java | 8 ++++---- .../java/org/apache/dubbo/rpc/protocol/http/HttpProtocol.java | 2 +- .../main/java/org/apache/dubbo/rpc/protocol/rmi/RmiProtocol.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/Version.java b/dubbo-common/src/main/java/org/apache/dubbo/common/Version.java index 6deb406..9f69ae8 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/Version.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/Version.java @@ -65,7 +65,7 @@ public final class Version { } /** - * To check the framework release version number to decide if it's 2.7.0 or higher + * Check the framework release version number to decide if it's 2.7.0 or higher */ public static boolean isRelease270OrHigher(String version) { if (StringUtils.isEmpty(version)) { @@ -78,11 +78,11 @@ public final class Version { } /** - * To check the framework release version number to decide if it's 2.6.3 or higher + * Check the framework release version number to decide if it's 2.6.3 or higher * * Because response attachments feature is firstly introduced in 2.6.3 - * and moreover we have no other approach to check the framework version number, so we use - * isSupportResponseAttachment to decide if it's v2.6.3 + * and moreover we have no other approach to know the framework's version, so we use + * isSupportResponseAttachment to decide if it's v2.6.3. */ public static boolean isRelease263OrHigher(String version) { return isSupportResponseAttachment(version); diff --git a/dubbo-rpc/dubbo-rpc-http/src/main/java/org/apache/dubbo/rpc/protocol/http/HttpProtocol.java b/dubbo-rpc/dubbo-rpc-http/src/main/java/org/apache/dubbo/rpc/protocol/http/HttpProtocol.java index 0ffa165..09ea055 100644 --- a/dubbo-rpc/dubbo-rpc-http/src/main/java/org/apache/dubbo/rpc/protocol/http/HttpProtocol.java +++ b/dubbo-rpc/dubbo-rpc-http/src/main/java/org/apache/dubbo/rpc/protocol/http/HttpProtocol.java @@ -127,7 +127,7 @@ public class HttpProtocol extends AbstractProxyProtocol { } else { /* The customized 'com.alibaba.dubbo.rpc.protocol.http.HttpRemoteInvocation' was firstly introduced - in v2.6.3. The main purpose is to support transformation of attachments in HttpProtocol: + in v2.6.3. The main purpose is to support transformation of attachments in HttpProtocol, see https://github.com/apache/incubator-dubbo/pull/1827. To guarantee interoperability with lower versions, we need to check if the provider is v2.6.3 or higher before sending customized HttpRemoteInvocation. 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 6a6a4a6..d3ba2e8 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 @@ -79,7 +79,7 @@ public class RmiProtocol extends AbstractProxyProtocol { /* RMI needs extra parameter since it uses customized remote invocation object - The customized RemoteInvocation was firstly introduced in v2.6.3; The package was renamed to 'org.apache.*' + The customized RemoteInvocation was firstly introduced in v2.6.3; The package was renamed to 'org.apache.*' since v2.7.0 Considering the above two conditions, we need to check before sending customized RemoteInvocation: 1. if the provider version is v2.7.0 or higher, send 'org.apache.dubbo.rpc.protocol.rmi.RmiRemoteInvocation'. 2. if the provider version is v2.6.3 or higher, send 'com.alibaba.dubbo.rpc.protocol.rmi.RmiRemoteInvocation'.
