You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2020/07/01 03:36:54 UTC
[dubbo] branch master updated: fix typo in CommonConstants (#6373)
This is an automated email from the ASF dual-hosted git repository.
liujun 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 41cbb23 fix typo in CommonConstants (#6373)
41cbb23 is described below
commit 41cbb23473e9443ac2f0d4a0dd77488bfcd06e09
Author: D-H-T <dh...@126.com>
AuthorDate: Wed Jul 1 11:36:37 2020 +0800
fix typo in CommonConstants (#6373)
---
.../java/org/apache/dubbo/common/constants/CommonConstants.java | 6 +++---
.../src/main/java/org/apache/dubbo/config/MetadataReportConfig.java | 4 ++--
.../src/main/java/org/apache/dubbo/rpc/filter/ContextFilter.java | 4 ++--
.../src/main/java/org/apache/dubbo/rpc/support/RpcUtils.java | 4 ++--
.../main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java | 6 +++---
5 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java b/dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java
index cac52fe..25e8417 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/constants/CommonConstants.java
@@ -112,7 +112,7 @@ public interface CommonConstants {
// used by invocation attachments to transfer timeout from Consumer to Provider.
// works as a replacement of TIMEOUT_KEY on wire, which seems to be totally useless in previous releases).
- String TIMEOUT_ATTACHENT_KEY = "_TO";
+ String TIMEOUT_ATTACHMENT_KEY = "_TO";
String TIME_COUNTDOWN_KEY = "timeout-countdown";
@@ -120,13 +120,13 @@ public interface CommonConstants {
String REMOVE_VALUE_PREFIX = "-";
- String PROPERTIES_CHAR_SEPERATOR = "-";
+ String PROPERTIES_CHAR_SEPARATOR = "-";
String UNDERLINE_SEPARATOR = "_";
String SEPARATOR_REGEX = "_|-";
- String GROUP_CHAR_SEPERATOR = ":";
+ String GROUP_CHAR_SEPARATOR = ":";
String HIDE_KEY_PREFIX = ".";
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/config/MetadataReportConfig.java b/dubbo-common/src/main/java/org/apache/dubbo/config/MetadataReportConfig.java
index 0abda27..175288c 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/config/MetadataReportConfig.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/config/MetadataReportConfig.java
@@ -24,7 +24,7 @@ import java.util.HashMap;
import java.util.Map;
import static org.apache.dubbo.common.constants.CommonConstants.DUBBO;
-import static org.apache.dubbo.common.constants.CommonConstants.PROPERTIES_CHAR_SEPERATOR;
+import static org.apache.dubbo.common.constants.CommonConstants.PROPERTIES_CHAR_SEPARATOR;
/**
* MetadataReportConfig
@@ -38,7 +38,7 @@ public class MetadataReportConfig extends AbstractConfig {
* the value is : metadata-report
*/
private static final String PREFIX_TAG = StringUtils.camelToSplitName(
- MetadataReportConfig.class.getSimpleName().substring(0, MetadataReportConfig.class.getSimpleName().length() - 6), PROPERTIES_CHAR_SEPERATOR);
+ MetadataReportConfig.class.getSimpleName().substring(0, MetadataReportConfig.class.getSimpleName().length() - 6), PROPERTIES_CHAR_SEPARATOR);
// Register center address
private String address;
diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/ContextFilter.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/ContextFilter.java
index 81ad8df..291601a 100644
--- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/ContextFilter.java
+++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/ContextFilter.java
@@ -40,7 +40,7 @@ import static org.apache.dubbo.common.constants.CommonConstants.INTERFACE_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.PATH_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.PROVIDER;
import static org.apache.dubbo.common.constants.CommonConstants.REMOTE_APPLICATION_KEY;
-import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_ATTACHENT_KEY;
+import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_ATTACHMENT_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.TIME_COUNTDOWN_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.VERSION_KEY;
@@ -71,7 +71,7 @@ public class ContextFilter implements Filter, Filter.Listener {
UNLOADING_KEYS.add(DUBBO_VERSION_KEY);
UNLOADING_KEYS.add(TOKEN_KEY);
UNLOADING_KEYS.add(TIMEOUT_KEY);
- UNLOADING_KEYS.add(TIMEOUT_ATTACHENT_KEY);
+ UNLOADING_KEYS.add(TIMEOUT_ATTACHMENT_KEY);
// Remove async property to avoid being passed to the following invoke chain.
UNLOADING_KEYS.add(ASYNC_KEY);
diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/RpcUtils.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/RpcUtils.java
index 18f9f68..5998d8e 100644
--- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/RpcUtils.java
+++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/RpcUtils.java
@@ -34,7 +34,7 @@ import java.util.concurrent.atomic.AtomicLong;
import static org.apache.dubbo.common.constants.CommonConstants.$INVOKE;
import static org.apache.dubbo.common.constants.CommonConstants.$INVOKE_ASYNC;
-import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_ATTACHENT_KEY;
+import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_ATTACHMENT_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_KEY;
import static org.apache.dubbo.rpc.Constants.$ECHO;
import static org.apache.dubbo.rpc.Constants.ASYNC_KEY;
@@ -217,7 +217,7 @@ public class RpcUtils {
public static long getTimeout(Invocation invocation, long defaultTimeout) {
long timeout = defaultTimeout;
- Object genericTimeout = invocation.getObjectAttachment(TIMEOUT_ATTACHENT_KEY);
+ Object genericTimeout = invocation.getObjectAttachment(TIMEOUT_ATTACHMENT_KEY);
if (genericTimeout != null) {
timeout = convertToNumber(genericTimeout, defaultTimeout);
}
diff --git a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java
index d88ae54..c415ac4 100644
--- a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java
+++ b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboInvoker.java
@@ -47,7 +47,7 @@ import static org.apache.dubbo.common.constants.CommonConstants.ENABLE_TIMEOUT_C
import static org.apache.dubbo.common.constants.CommonConstants.GROUP_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.INTERFACE_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.PATH_KEY;
-import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_ATTACHENT_KEY;
+import static org.apache.dubbo.common.constants.CommonConstants.TIMEOUT_ATTACHMENT_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.TIME_COUNTDOWN_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.VERSION_KEY;
import static org.apache.dubbo.rpc.Constants.TOKEN_KEY;
@@ -168,12 +168,12 @@ public class DubboInvoker<T> extends AbstractInvoker<T> {
if (countdown == null) {
timeout = (int) RpcUtils.getTimeout(getUrl(), methodName, RpcContext.getContext(), DEFAULT_TIMEOUT);
if (getUrl().getParameter(ENABLE_TIMEOUT_COUNTDOWN_KEY, false)) {
- invocation.setObjectAttachment(TIMEOUT_ATTACHENT_KEY, timeout); // pass timeout to remote server
+ invocation.setObjectAttachment(TIMEOUT_ATTACHMENT_KEY, timeout); // pass timeout to remote server
}
} else {
TimeoutCountDown timeoutCountDown = (TimeoutCountDown) countdown;
timeout = (int) timeoutCountDown.timeRemaining(TimeUnit.MILLISECONDS);
- invocation.setObjectAttachment(TIMEOUT_ATTACHENT_KEY, timeout);// pass timeout to remote server
+ invocation.setObjectAttachment(TIMEOUT_ATTACHMENT_KEY, timeout);// pass timeout to remote server
}
return timeout;
}