From 3ba5c8cbd7b97d48b2ae53b5b0e3dc17a2184556 Mon Sep 17 00:00:00 2001 From: mimihom Date: Thu, 17 Jan 2019 10:19:32 +0800 Subject: [PATCH] modify some typos (#3257) * modify some typos * fix some other addionalParameterKeys and paramter typos --- .../src/main/java/org/apache/dubbo/common/Constants.java | 4 ++-- .../src/main/java/org/apache/dubbo/common/Parameters.java | 4 ++-- .../org/apache/dubbo/config/AbstractInterfaceConfig.java | 2 +- .../main/java/org/apache/dubbo/config/RegistryConfig.java | 4 ++-- .../apache/dubbo/registry/integration/RegistryProtocol.java | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/Constants.java b/dubbo-common/src/main/java/org/apache/dubbo/common/Constants.java index f799358afe3..b0df6360c07 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/Constants.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/Constants.java @@ -489,12 +489,12 @@ public class Constants { */ public static final String SIMPLE_CONSUMER_CONFIG_KEY = "simple.consumer.config"; /** - * After simplify the registry, should add some paramter individually for provider. + * After simplify the registry, should add some parameter individually for provider. * @since 2.7.0 */ public static final String EXTRA_PROVIDER_CONFIG_KEYS_KEY = "extra.provider.keys"; /** - * After simplify the registry, should add some paramter individually for consumer. + * After simplify the registry, should add some parameter individually for consumer. * * @since 2.7.0 */ diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/Parameters.java b/dubbo-common/src/main/java/org/apache/dubbo/common/Parameters.java index e321e0a23c0..333270c9de3 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/Parameters.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/Parameters.java @@ -163,7 +163,7 @@ public boolean getBooleanParameter(String key, boolean defaultValue) { return Boolean.parseBoolean(value); } - public boolean hasParamter(String key) { + public boolean hasParameter(String key) { String value = getParameter(key); return value != null && value.length() > 0; } @@ -234,7 +234,7 @@ public boolean getMethodBooleanParameter(String method, String key, boolean defa return Boolean.parseBoolean(value); } - public boolean hasMethodParamter(String method, String key) { + public boolean hasMethodParameter(String method, String key) { String value = getMethodParameter(method, key); return value != null && value.length() > 0; } diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java index a4c24f66ed7..8d49b9976c2 100644 --- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java +++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java @@ -454,7 +454,7 @@ private void verify(Class interfaceClass, Class localClass) { } try { - //Check if the localClass a contructor with parameter who's type is interfaceClass + //Check if the localClass a constructor with parameter who's type is interfaceClass ReflectUtils.findConstructor(localClass, interfaceClass); } catch (NoSuchMethodException e) { throw new IllegalStateException("No such constructor \"public " + localClass.getSimpleName() + diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/RegistryConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/RegistryConfig.java index 6abbdaea3b6..0006b0e3595 100644 --- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/RegistryConfig.java +++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/RegistryConfig.java @@ -132,8 +132,8 @@ public class RegistryConfig extends AbstractConfig { */ private Boolean simple; /** - * After simplify the registry, should add some paramter individually. - * addionalParameterKeys = addParamKeys + * After simplify the registry, should add some parameter individually. + * additionalParameterKeys = addParamKeys * * @since 2.7.0 */ diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java index 453f958541b..4cb5efd6f41 100644 --- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java +++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryProtocol.java @@ -398,11 +398,11 @@ private URL getRegisteredConsumerUrl(final URL consumerUrl, URL registryUrl) { } // available to test - public String[] getParamsToRegistry(String[] defaultKeys, String[] addionalParameterKeys) { - int additionalLen = addionalParameterKeys.length; + public String[] getParamsToRegistry(String[] defaultKeys, String[] additionalParameterKeys) { + int additionalLen = additionalParameterKeys.length; String[] registryParams = new String[defaultKeys.length + additionalLen]; System.arraycopy(defaultKeys, 0, registryParams, 0, defaultKeys.length); - System.arraycopy(addionalParameterKeys, 0, registryParams, defaultKeys.length, additionalLen); + System.arraycopy(additionalParameterKeys, 0, registryParams, defaultKeys.length, additionalLen); return registryParams; }