dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Duncan-tree-zhou (GitHub) <git...@apache.org>
Subject [GitHub] [incubator-dubbo] Duncan-tree-zhou opened issue #3795: Found hard code Strings, which should be replace by constants.
Date Tue, 02 Apr 2019 14:00:58 GMT
- [ ] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this
repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md)
of this repository and believe that this is not a duplicate.

### Environment

* Dubbo version: master
* Operating System version: any
* Java version: any

### Steps to reproduce this issue

1. no step

Pls. provide [GitHub address] to reproduce this issue.

### Expected Result
package org.apache.dubbo.config;
public class RegistryConfig extends AbstractConfig {
    public void setUsername(String username) {
        checkName("username", username);
        this.username = username;
    public void setPassword(String password) {
        checkLength("password", password);
        this.password = password;
some property name use hard code String. actually they was defined in org.apache.dubbo.common.Constants.

the following is a list of hard code Strings in RegistryConfig and the correct Constrants.
"username" - >Constants.USERNAME_KEY
"password" - >Constants.PASSWORD_KEY
"file" - > Constants.FILE_KEY
"client" - > Constants.CLIENT_KEY

What do you expected from the above steps´╝č

the hard code String should be replace by constants

What actually happens?

If there is an exception, please attach the exception trace:



[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3795 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
View raw message