{"record":{"id":"ce9a18eb3a90726a","repo":"apache/dubbo","slug":"addresses-is-not-allowed-to-be-empty-please-re-en","errorCode":null,"errorMessage":"Addresses is not allowed to be empty, please re-enter.","messagePattern":"Addresses is not allowed to be empty, please re-enter\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"warning","filePath":"dubbo-common/src/main/java/org/apache/dubbo/common/utils/UrlUtils.java","lineNumber":186,"sourceCode":"                        changed = true;\n                        parameters.put(key, defaultValue);\n                    }\n                }\n            }\n        }\n        if (changed) {\n            u = new ServiceConfigURL(protocol, username, password, host, port, path, parameters);\n        }\n        return u;\n    }\n\n    public static List<URL> parseURLs(String address, Map<String, String> defaults) {\n        if (StringUtils.isEmpty(address)) {\n            throw new IllegalArgumentException(\"Address is not allowed to be empty, please re-enter.\");\n        }\n        String[] addresses = REGISTRY_SPLIT_PATTERN.split(address);\n        if (addresses == null || addresses.length == 0) {\n            throw new IllegalArgumentException(\n                    \"Addresses is not allowed to be empty, please re-enter.\"); // here won't be empty\n        }\n        List<URL> registries = new ArrayList<>();\n        for (String addr : addresses) {\n            registries.add(parseURL(addr, defaults));\n        }\n        return registries;\n    }\n\n    public static Map<String, Map<String, String>> convertRegister(Map<String, Map<String, String>> register) {\n        Map<String, Map<String, String>> newRegister = new HashMap<>();\n        for (Map.Entry<String, Map<String, String>> entry : register.entrySet()) {\n            String serviceName = entry.getKey();\n            Map<String, String> serviceUrls = entry.getValue();\n            if (StringUtils.isNotContains(serviceName, ':') && StringUtils.isNotContains(serviceName, '/')) {\n                for (Map.Entry<String, String> entry2 : serviceUrls.entrySet()) {\n                    String serviceUrl = entry2.getKey();\n                    String serviceQuery = entry2.getValue();","sourceCodeStart":168,"sourceCodeEnd":204,"githubUrl":"https://github.com/apache/dubbo/blob/3a3043227f5571d25eb2889de5bca22f2914843b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/UrlUtils.java#L168-L204","documentation":"Thrown by UrlUtils.parseURLs when REGISTRY_SPLIT_PATTERN.split(address) yields a null or empty array. The inline comment 'here won't be empty' indicates the developers consider this branch effectively unreachable — String.split always returns at least one element for non-null input, and the earlier isEmpty guard already excluded null/blank. Hitting this would indicate an unexpected split-pattern behavior.","triggerScenarios":"This branch is considered unreachable by the code authors. It could only trigger if a custom regex pattern (REGISTRY_SPLIT_PATTERN) were configured in a way that String.split returns an empty array, which does not happen with standard JDK behavior for non-empty input.","commonSituations":"Effectively never seen in practice. If observed, investigate whether REGISTRY_SPLIT_PATTERN was modified or whether a non-standard JVM split implementation is in use.","solutions":["Treat as a bug if encountered — file a Dubbo issue with the exact address string and pattern.","Ensure the input address is a valid, non-empty registry URL string (the isEmpty guard at line 182 should have caught blank input).","Verify REGISTRY_SPLIT_PATTERN has not been tampered with via reflection or classpath shading."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// This branch is considered unreachable by the code authors.\n// Validate input as for error 297 — ensure address is non-empty before calling parseURLs.","typeGuard":null,"tryCatchPattern":"try {\n    List<URL> urls = UrlUtils.parseURLs(address, defaults);\n} catch (IllegalArgumentException e) {\n    // investigate REGISTRY_SPLIT_PATTERN or report as Dubbo bug\n}","preventionTips":["Treat this error as a potential bug if encountered and report it upstream.","Ensure REGISTRY_SPLIT_PATTERN has not been altered via shading or reflection."],"tags":["url-parsing","unreachable","registry","dubbo-common"],"backgroundTag":null,"analyzedSha":"3a3043227f5571d25eb2889de5bca22f2914843b","analyzedAt":"2026-08-14T00:43:19.853Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}