This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch 3.3
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/3.3 by this push:
new c72c55aa67 refactor: modify variable naming and extract constants
(#13176)
c72c55aa67 is described below
commit c72c55aa672b2974c26f94d2ebf56d004b1c9f19
Author: lazy <[email protected]>
AuthorDate: Tue Oct 10 00:59:28 2023 -0500
refactor: modify variable naming and extract constants (#13176)
---
.../java/org/apache/dubbo/common/constants/RegistryConstants.java | 1 +
.../src/main/java/org/apache/dubbo/config/ServiceConfig.java | 4 ++--
.../java/org/apache/dubbo/config/utils/ConfigValidationUtils.java | 3 ++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git
a/dubbo-common/src/main/java/org/apache/dubbo/common/constants/RegistryConstants.java
b/dubbo-common/src/main/java/org/apache/dubbo/common/constants/RegistryConstants.java
index 38c7952bd6..c26f67a02c 100644
---
a/dubbo-common/src/main/java/org/apache/dubbo/common/constants/RegistryConstants.java
+++
b/dubbo-common/src/main/java/org/apache/dubbo/common/constants/RegistryConstants.java
@@ -142,5 +142,6 @@ public interface RegistryConstants {
String ENABLE_EMPTY_PROTECTION_KEY = "enable-empty-protection";
boolean DEFAULT_ENABLE_EMPTY_PROTECTION = false;
String REGISTER_CONSUMER_URL_KEY = "register-consumer-url";
+ String REGISTRY_PROTOCOL_TYPE = "registry-protocol-type";
}
diff --git
a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
index a3af6e4943..41ba085d7c 100644
---
a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
+++
b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
@@ -226,7 +226,7 @@ public class ServiceConfig<T> extends ServiceConfigBase<T> {
exporters.clear();
}
unexported = true;
- onUnexpoted();
+ onUnExported();
ModuleServiceRepository repository =
getScopeModel().getServiceRepository();
repository.unregisterProvider(providerModel);
}
@@ -918,7 +918,7 @@ public class ServiceConfig<T> extends ServiceConfigBase<T> {
}
}
- protected void onUnexpoted() {
+ protected void onUnExported() {
for (ServiceListener serviceListener : this.serviceListeners) {
serviceListener.unexported(this);
}
diff --git
a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java
b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java
index 1f92b894ad..bc52ea8f7b 100644
---
a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java
+++
b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java
@@ -111,6 +111,7 @@ import static
org.apache.dubbo.common.constants.RegistryConstants.REGISTRY_KEY;
import static
org.apache.dubbo.common.constants.RegistryConstants.REGISTRY_PROTOCOL;
import static
org.apache.dubbo.common.constants.RegistryConstants.REGISTRY_TYPE_KEY;
import static
org.apache.dubbo.common.constants.RegistryConstants.SERVICE_REGISTRY_PROTOCOL;
+import static
org.apache.dubbo.common.constants.RegistryConstants.REGISTRY_PROTOCOL_TYPE;
import static org.apache.dubbo.common.constants.RemotingConstants.BACKUP_KEY;
import static org.apache.dubbo.common.utils.StringUtils.isEmpty;
import static org.apache.dubbo.common.utils.StringUtils.isNotEmpty;
@@ -605,7 +606,7 @@ public class ConfigValidationUtils {
}
private static String getRegistryProtocolType(URL url) {
- String registryProtocol = url.getParameter("registry-protocol-type");
+ String registryProtocol = url.getParameter(REGISTRY_PROTOCOL_TYPE);
return isNotEmpty(registryProtocol) ? registryProtocol :
REGISTRY_PROTOCOL;
}