[Dubbo-3795] replace hard code strings with constants in config moudule#3803
Merged
ralf0131 merged 1 commit intoapache:masterfrom Apr 4, 2019
Duncan-tree-zhou:fix-use-constants
Merged
[Dubbo-3795] replace hard code strings with constants in config moudule#3803ralf0131 merged 1 commit intoapache:masterfrom Duncan-tree-zhou:fix-use-constants
ralf0131 merged 1 commit intoapache:masterfrom
Duncan-tree-zhou:fix-use-constants
Conversation
in ServiceConfig:
"revision" -> Constants.REVISION_KEY
"registry" -> Constants.REGISTRY_KEY
in RegistryConfig:
"username" -> Constants.USERNAME_KEY
"password" -> Constants.PASSWORD_KEY
"file" -> Constants.FILE_KEY
"client" -> Constants.CLIENT_KEY
in ReferenceConfig:
"revision" -> Constants.REVISION_KEY
"methods" -> Constants.METHODS_KEY
"client" -> Constants.CLIENT_KEY
in ProviderConfig:
"contextpath" -> Constants.CONTEXTPATH_KEY
"status" -> Constants.STATUS_KEY
in AbstractInterfaceConfig
"logstat" -> Constants.LOGSTAT_PROTOCOL
"local" -> Constants.LOCAL_KEY
"cluster" -> Constants.CLUSTER_KEY
"proxy" -> Constants.PROXY_KEY
"filter" -> Constants.FILE_KEY
"listener" -> Constants.LISTENER_KEY
"layer" -> Constants.LAYER_KEY
add following constant vars :
public static final String STATUS_KEY = "status";
public static final String CONTEXTPATH_KEY = "contextpath";
public static final String LISTENER_KEY = "listener";
public static final String LAYER_KEY = "layer";
public static final String LOGSTAT_PROTOCOL = "logstat";
2 tasks
Contributor
Author
|
related issue #3795 |
ralf0131
approved these changes
Apr 4, 2019
Contributor
ralf0131
left a comment
There was a problem hiding this comment.
LGTM, thanks for the pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is the purpose of the change
replace hard code strings with constants in config module.
Brief changelog
the following hard code strings had been replaced:
"revision" -> Constants.REVISION_KEY
"registry" -> Constants.REGISTRY_KEY
"username" -> Constants.USERNAME_KEY
"password" -> Constants.PASSWORD_KEY
"file" -> Constants.FILE_KEY
"client" -> Constants.CLIENT_KEY
"revision" -> Constants.REVISION_KEY
"methods" -> Constants.METHODS_KEY
"client" -> Constants.CLIENT_KEY
"contextpath" -> Constants.CONTEXTPATH_KEY
"status" -> Constants.STATUS_KEY
"logstat" -> Constants.LOGSTAT_PROTOCOL
"local" -> Constants.LOCAL_KEY
"cluster" -> Constants.CLUSTER_KEY
"proxy" -> Constants.PROXY_KEY
"filter" -> Constants.FILE_KEY
"listener" -> Constants.LISTENER_KEY
"layer" -> Constants.LAYER_KEY
the following constant vars in Constants.java :
Verifying this change
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
[Dubbo-XXX] Fix UnknownException when host config not exist #XXX. Each commit in the pull request should have a meaningful subject line and body.mvn clean install -DskipTests=false&mvn clean test-compile failsafe:integration-testto make sure unit-test and integration-test pass.