Skip to content

Commit

Permalink
refactor method name
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenlj committed Jan 15, 2019
1 parent f73e8cc commit 1e1a5ec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static String getVersion() {
}

/**
* 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)) {
Expand All @@ -78,11 +78,11 @@ public static boolean isRelease270OrHigher(String 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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public RemoteInvocation createRemoteInvocation(MethodInvocation methodInvocation
} 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected <T> T doRefer(final Class<T> serviceType, final URL url) throws RpcExc
/*
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'.
Expand Down

0 comments on commit 1e1a5ec

Please sign in to comment.