{"record":{"id":"3bb6e94651374a6b","repo":"flowable/flowable-engine","slug":"deployment-ids-is-null-3bb6e9","errorCode":null,"errorMessage":"Deployment ids is null","messagePattern":"Deployment ids is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CmmnDeploymentQueryImpl.java","lineNumber":72,"sourceCode":"    }\n\n    public CmmnDeploymentQueryImpl(CommandExecutor commandExecutor) {\n        super(commandExecutor);\n    }\n\n    @Override\n    public CmmnDeploymentQueryImpl deploymentId(String deploymentId) {\n        if (deploymentId == null) {\n            throw new FlowableIllegalArgumentException(\"Deployment id is null\");\n        }\n        this.deploymentId = deploymentId;\n        return this;\n    }\n    \n    @Override\n    public CmmnDeploymentQueryImpl deploymentIds(List<String> deploymentIds) {\n        if (deploymentIds == null) {\n            throw new FlowableIllegalArgumentException(\"Deployment ids is null\");\n        }\n        this.deploymentIds = deploymentIds;\n        return this;\n    }\n\n    @Override\n    public CmmnDeploymentQueryImpl deploymentName(String deploymentName) {\n        if (deploymentName == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentName is null\");\n        }\n        this.name = deploymentName;\n        return this;\n    }\n\n    @Override\n    public CmmnDeploymentQueryImpl deploymentNameLike(String nameLike) {\n        if (nameLike == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentNameLike is null\");","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CmmnDeploymentQueryImpl.java#L54-L90","documentation":"FlowableIllegalArgumentException thrown by CmmnDeploymentQueryImpl.deploymentIds when the deploymentIds list is null. The query needs a non-null list of deployment ids to build an IN filter; null is rejected instead of being treated as an empty or absent filter.","triggerScenarios":"Calling cmmnRepositoryService.createDeploymentQuery().deploymentIds(null), typically when the id list comes from a collection that was never populated or a lookup that returned null.","commonSituations":"Passing a null collection assembled from external input, forgetting to initialize the list before query construction, optional filtering logic that should have skipped the call.","solutions":["Ensure the list is non-null (use Collections.emptyList() if no ids) before calling","Skip the deploymentIds() call when the list is absent, so the filter is simply not applied","Check the upstream producer of the id list for null returns"],"exampleFix":"// before\nquery.deploymentIds(idsFromConfig); // may be null\n// after\nif (idsFromConfig != null && !idsFromConfig.isEmpty()) { query.deploymentIds(idsFromConfig); }","handlingStrategy":"validation","validationCode":"if (ids != null && !ids.isEmpty()) { query.deploymentIds(ids); }","typeGuard":"static boolean hasDeploymentIds(List<String> ids) { return ids != null && !ids.isEmpty(); }","tryCatchPattern":"try {\n    query.deploymentIds(ids);\n} catch (FlowableIllegalArgumentException e) {\n    if (\"Deployment ids is null\".equals(e.getMessage())) {\n        throw new IllegalArgumentException(\"deploymentIds list must not be null\", e);\n    }\n    throw e;\n}","preventionTips":["Treat 'no filter' as 'skip the call', never as null argument","Default lists to Collections.emptyList() instead of null","Use Optional<List<String>> to make absence explicit in query-builder APIs","Validate id collections assembled from external input"],"tags":["null-check","query","argument-validation","cmmn"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}