{"record":{"id":"09cba93f904bc80f","repo":"apache/dolphinscheduler","slug":"resource-path-should-not-be-empty","errorCode":null,"errorMessage":"Resource path should not be empty","messagePattern":"Resource path should not be empty","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"dolphinscheduler-storage-plugin/dolphinscheduler-storage-api/src/main/java/org/apache/dolphinscheduler/plugin/storage/api/AbstractStorageOperator.java","lineNumber":101,"sourceCode":"                break;\n            case ALL:\n                resourceBaseDirectory = tenantBaseDirectory;\n                break;\n            default:\n                throw new IllegalArgumentException(\"Resource type: \" + resourceType + \" not supported\");\n        }\n        // All directory should end with File.separator\n        return resourceBaseDirectory;\n    }\n\n    @Override\n    public String getStorageFileAbsolutePath(String tenantCode, String fileName) {\n        return FileUtils.concatFilePath(getStorageBaseDirectory(tenantCode, ResourceType.FILE), fileName);\n    }\n\n    protected void exceptionIfPathEmpty(String resourceAbsolutePath) {\n        if (StringUtils.isEmpty(resourceAbsolutePath)) {\n            throw new IllegalArgumentException(\"Resource path should not be empty\");\n        }\n    }\n\n    protected void exceptionIfPathNotUnderStorageBaseDir(String resourceAbsolutePath) {\n        String storageBaseDirectory = getStorageBaseDirectory();\n        if (!resourceAbsolutePath.startsWith(storageBaseDirectory)) {\n            throw new IllegalArgumentException(\n                    \"Resource path: \" + resourceAbsolutePath + \" is not under storage base directory: \"\n                            + storageBaseDirectory);\n        }\n    }\n\n}\n","sourceCodeStart":83,"sourceCodeEnd":115,"githubUrl":"https://github.com/apache/dolphinscheduler/blob/02eac45a1b6676e639fcbfb4be2243de5771b05d/dolphinscheduler-storage-plugin/dolphinscheduler-storage-api/src/main/java/org/apache/dolphinscheduler/plugin/storage/api/AbstractStorageOperator.java#L83-L115","documentation":"A guard helper, exceptionIfPathEmpty, threw IllegalArgumentException because the resource absolute path passed to a storage operation was null or empty. It is a defensive check used by fetchResource/Basename operations; the offending input is the empty path argument, usually caused by a resource record with a null fullName or a caller passing an unset variable.","triggerScenarios":"Thrown at dolphinscheduler-storage-plugin/dolphinscheduler-storage-api/src/main/java/org/apache/dolphinscheduler/plugin/storage/api/AbstractStorageOperator.java:101 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check why the caller produced a null/empty resource path (missing resource fullName, unset variable, failed concatenation)","Add null/empty validation at the API layer so users get a clear 400 instead of a server-side guard exception"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"02eac45a1b6676e639fcbfb4be2243de5771b05d","analyzedAt":"2026-09-06T17:43:00.555Z","contentChangedAt":"2026-09-06T17:43:00.555Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}