{"record":{"id":"fdae5ae0e50d8cc3","repo":"quarkusio/quarkus","slug":"specified-path-can-not-be-empty","errorCode":null,"errorMessage":"Specified path can not be empty","messagePattern":"Specified path can not be empty","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/NonApplicationRootPathBuildItem.java","lineNumber":163,"sourceCode":"     * <li>{@code resolvePath(\"/foo\")} will return {@literal /foo}</li>\n     * </ul>\n     * Given {@literal quarkus.http.root-path=/app} and\n     * {@literal quarkus.http.non-application-root-path=\"/q\"}\n     * <ul>\n     * <li>{@code resolvePath(\"foo\")} will return {@literal /q/foo}</li>\n     * <li>{@code resolvePath(\"/foo\")} will return {@literal /foo}</li>\n     * </ul>\n     * <p>\n     * The returned path will not end with a slash.\n     *\n     * @param path Path to be resolved to an absolute path.\n     * @return An absolute path not ending with a slash\n     * @throws IllegalArgumentException if path is null or empty\n     * @see UriNormalizationUtil#normalizeWithBase(URI, String, boolean)\n     */\n    public String resolvePath(String path) {\n        if (path == null || path.trim().isEmpty()) {\n            throw new IllegalArgumentException(\"Specified path can not be empty\");\n        }\n        return UriNormalizationUtil.normalizeWithBase(nonApplicationRootPath, path, false).getPath();\n    }\n\n    public String resolveManagementPath(String path, ManagementInterfaceBuildTimeConfig managementBuildTimeConfig,\n            LaunchModeBuildItem mode) {\n        return resolveManagementPath(path, managementBuildTimeConfig, mode, true);\n    }\n\n    public String resolveManagementPath(String path, ManagementInterfaceBuildTimeConfig managementBuildTimeConfig,\n            LaunchModeBuildItem mode, boolean extensionOverride) {\n        if (path == null || path.trim().isEmpty()) {\n            throw new IllegalArgumentException(\"Specified path can not be empty\");\n        }\n        if (managementBuildTimeConfig.enabled() && extensionOverride) {\n            // Best effort\n            String prefix = getManagementUrlPrefix(mode);\n            if (managementRootPath != null) {","sourceCodeStart":145,"sourceCodeEnd":181,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/vertx-http/deployment/src/main/java/io/quarkus/vertx/http/deployment/NonApplicationRootPathBuildItem.java#L145-L181","documentation":"NonApplicationRootPathBuildItem.resolvePath resolves an extension's non-application (management, dev UI, etc.) path against the configured non-application root. A null or whitespace-only path cannot be normalized to a route, so it throws IllegalArgumentException immediately. This is a programming/configuration error detected at build time.","triggerScenarios":"Calling resolvePath(null), resolvePath(\"\"), or resolvePath(\"   \") — typically when a config property like a UI/metrics path is unset or blank and passed straight in.","commonSituations":"Extension configuration property left unset with a blank default; YAML/properties value that is empty string; code that forgot to apply a default before resolving the route.","solutions":["Pass a non-empty path, e.g. resolvePath(\"/health\")","Add a sensible default before calling: path != null ? path : \"/default\"","Guard the call with a blank check and skip route registration if unset"],"exampleFix":"// before\nString path = config.path(); // may be \"\"\nbuildItem.resolvePath(path);\n// after\nif (path != null && !path.isBlank()) {\n    buildItem.resolvePath(path);\n}","handlingStrategy":"validation","validationCode":"if (path == null || path.isBlank()) {\n    path = \"/default-path\"; // or skip registration\n}","typeGuard":"boolean isValidPath(String p) { return p != null && !p.isBlank(); }","tryCatchPattern":null,"preventionTips":["Never pass raw optional config strings directly to resolvePath","Apply defaults before resolving routes","Validate path-bearing config at startup"],"tags":["quarkus","build-time","path","configuration"],"backgroundTag":"blank-path-parameter","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}