apache / dubbo-admin

@@ -103,11 +103,11 @@
Loading
103 103
104 104
            if (StringUtils.isNotEmpty(config)) {
105 105
                Arrays.stream(config.split("\n")).forEach( s -> {
106 -
                    if(s.startsWith(Constants.REGISTRY_ADDRESS)) {
107 -
                        String registryAddress = s.split("=")[1].trim();
106 +
                    if (s.startsWith(Constants.REGISTRY_ADDRESS)) {
107 +
                        String registryAddress = removerConfigKey(s);
108 108
                        registryUrl = formUrl(registryAddress, registryGroup, registryNameSpace, username, password);
109 109
                    } else if (s.startsWith(Constants.METADATA_ADDRESS)) {
110 -
                        metadataUrl = formUrl(s.split("=")[1].trim(), metadataGroup, metadataGroupNameSpace, username, password);
110 +
                        metadataUrl = formUrl(removerConfigKey(s), metadataGroup, metadataGroupNameSpace, username, password);
111 111
                    }
112 112
                });
113 113
            }
@@ -168,6 +168,13 @@
Loading
168 168
        return metaDataCollector;
169 169
    }
170 170
171 +
    public static String removerConfigKey(String properties) {
172 +
        String[] split = properties.split("=");
173 +
        String[] address = new String[split.length - 1];
174 +
        System.arraycopy(split, 1, address, 0, split.length - 1);
175 +
        return String.join("=", address).trim();
176 +
    }
177 +
171 178
    private URL formUrl(String config, String group, String nameSpace, String username, String password) {
172 179
        URL url = URL.valueOf(config);
173 180
        if (StringUtils.isEmpty(url.getParameter(Constants.GROUP_KEY)) && StringUtils.isNotEmpty(group)) {
Files Complexity Coverage
dubbo-admin-server/src/main/java/org/apache/dubbo/admin 18.61% 20.26%
Project Totals (97 files) 18.61% 20.26%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading