{"record":{"id":"c85995411dd0f8e0","repo":"flowable/flowable-engine","slug":"deployment-ids-is-null","errorCode":null,"errorMessage":"Deployment ids is null","messagePattern":"Deployment ids is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDeploymentQueryImpl.java","lineNumber":69,"sourceCode":"    }\n\n    public AppDeploymentQueryImpl(CommandExecutor commandExecutor) {\n        super(commandExecutor);\n    }\n\n    @Override\n    public AppDeploymentQueryImpl 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 AppDeploymentQueryImpl 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 AppDeploymentQueryImpl 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 AppDeploymentQueryImpl deploymentNameLike(String nameLike) {\n        if (nameLike == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentNameLike is null\");","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDeploymentQueryImpl.java#L51-L87","documentation":"AppDeploymentQueryImpl.deploymentIds() throws FlowableIllegalArgumentException when the List<String> argument is null. The in-list filter needs a real list; null is rejected at call time instead of producing broken SQL.","triggerScenarios":"Calling deploymentIds(null) with a list variable never initialized, or a service method returning null instead of an empty list.","commonSituations":"Deserialization of an optional query parameter that yields null, or collecting deployment ids from a loop that never ran and leaving the list null.","solutions":["Initialize the list (Collections.emptyList()) so it is never null.","Guard with if (ids != null) before calling deploymentIds.","If empty means 'no filter', skip the deploymentIds call when ids.isEmpty().","Catch FlowableIllegalArgumentException and convert to a validation error response."],"exampleFix":"// before\nquery.deploymentIds(ids); // ids may be null\n// after\nList<String> ids = (idsOrNull == null) ? java.util.Collections.emptyList() : idsOrNull;\nif (!ids.isEmpty()) query.deploymentIds(ids);","handlingStrategy":"validation","validationCode":"List<String> safeIds = deploymentIds == null ? java.util.Collections.emptyList() : deploymentIds;","typeGuard":"boolean isNonEmptyList(List<String> l) { return l != null && !l.isEmpty(); }","tryCatchPattern":"try {\n    query.deploymentIds(ids);\n} catch (org.flowable.common.engine.api.FlowableIllegalArgumentException e) {\n    throw new javax.ws.rs.BadRequestException(\"deploymentIds must not be null\", e);\n}","preventionTips":["Initialize lists to empty rather than null","Return empty collections from service methods, never null","Skip optional filters when the collection is empty"],"tags":["java","flowable","query","null-check"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}