Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust constant name #7958

Merged
merged 1 commit into from
Jun 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ public interface Constants {
String SHUTDOWN_TIMEOUT_KEY = "shutdown.timeout";


String PROTOCOLS_SUFFIX = "dubbo.protocols.";
String PROTOCOLS_PREFIX = "dubbo.protocols.";


String REGISTRIES_SUFFIX = "dubbo.registries.";
String REGISTRIES_PREFIX = "dubbo.registries.";

String ZOOKEEPER_PROTOCOL = "zookeeper";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import static org.apache.dubbo.common.constants.CommonConstants.DUBBO_VERSION_KEY;
import static org.apache.dubbo.common.constants.CommonConstants.SSL_ENABLED_KEY;
import static org.apache.dubbo.config.Constants.PROTOCOLS_SUFFIX;
import static org.apache.dubbo.config.Constants.PROTOCOLS_PREFIX;

/**
* ProtocolConfig
Expand Down Expand Up @@ -530,7 +530,7 @@ public void refresh() {
}
super.refresh();
if (StringUtils.isNotEmpty(this.getId())) {
this.setPrefix(PROTOCOLS_SUFFIX);
this.setPrefix(PROTOCOLS_PREFIX);
super.refresh();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import static org.apache.dubbo.common.constants.CommonConstants.SHUTDOWN_WAIT_KEY;
import static org.apache.dubbo.common.constants.RemotingConstants.BACKUP_KEY;
import static org.apache.dubbo.common.utils.PojoUtils.updatePropertyIfAbsent;
import static org.apache.dubbo.config.Constants.REGISTRIES_SUFFIX;
import static org.apache.dubbo.config.Constants.REGISTRIES_PREFIX;

/**
* RegistryConfig
Expand Down Expand Up @@ -506,7 +506,7 @@ public void setWeight(Integer weight) {
public void refresh() {
super.refresh();
if (StringUtils.isNotEmpty(this.getId())) {
this.setPrefix(REGISTRIES_SUFFIX);
this.setPrefix(REGISTRIES_PREFIX);
super.refresh();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
import static org.apache.dubbo.common.utils.ReflectUtils.getProperty;
import static org.apache.dubbo.common.utils.StringUtils.isNotEmpty;
import static org.apache.dubbo.config.AbstractConfig.getTagName;
import static org.apache.dubbo.config.Constants.PROTOCOLS_SUFFIX;
import static org.apache.dubbo.config.Constants.REGISTRIES_SUFFIX;
import static org.apache.dubbo.config.Constants.PROTOCOLS_PREFIX;
import static org.apache.dubbo.config.Constants.REGISTRIES_PREFIX;

public class ConfigManager extends LifecycleAdapter implements FrameworkExt {

Expand Down Expand Up @@ -258,9 +258,9 @@ public Collection<ProtocolConfig> getProtocols() {
public Set<String> getProtocolIds() {
Set<String> protocolIds = new HashSet<>();
protocolIds.addAll(getSubProperties(ApplicationModel.getEnvironment()
.getExternalConfigurationMap(), PROTOCOLS_SUFFIX));
.getExternalConfigurationMap(), PROTOCOLS_PREFIX));
protocolIds.addAll(getSubProperties(ApplicationModel.getEnvironment()
.getAppExternalConfigurationMap(), PROTOCOLS_SUFFIX));
.getAppExternalConfigurationMap(), PROTOCOLS_PREFIX));

return unmodifiableSet(protocolIds);
}
Expand Down Expand Up @@ -293,9 +293,9 @@ public Collection<RegistryConfig> getRegistries() {
public Set<String> getRegistryIds() {
Set<String> registryIds = new HashSet<>();
registryIds.addAll(getSubProperties(ApplicationModel.getEnvironment().getExternalConfigurationMap(),
REGISTRIES_SUFFIX));
REGISTRIES_PREFIX));
registryIds.addAll(getSubProperties(ApplicationModel.getEnvironment().getAppExternalConfigurationMap(),
REGISTRIES_SUFFIX));
REGISTRIES_PREFIX));

return unmodifiableSet(registryIds);
}
Expand Down