{"record":{"id":"b1802e43caa01531","repo":"flowable/flowable-engine","slug":"deploymentname-is-null-b1802e","errorCode":null,"errorMessage":"deploymentName is null","messagePattern":"deploymentName is null","errorType":"validation","errorClass":"ActivitiIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/DeploymentQueryImpl.java","lineNumber":66,"sourceCode":"    }\n\n    public DeploymentQueryImpl(CommandExecutor commandExecutor) {\n        super(commandExecutor);\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentId(String deploymentId) {\n        if (deploymentId == null) {\n            throw new ActivitiIllegalArgumentException(\"Deployment id is null\");\n        }\n        this.deploymentId = deploymentId;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentName(String deploymentName) {\n        if (deploymentName == null) {\n            throw new ActivitiIllegalArgumentException(\"deploymentName is null\");\n        }\n        this.name = deploymentName;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentNameLike(String nameLike) {\n        if (nameLike == null) {\n            throw new ActivitiIllegalArgumentException(\"deploymentNameLike is null\");\n        }\n        this.nameLike = nameLike;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentCategory(String deploymentCategory) {\n        if (deploymentCategory == null) {\n            throw new ActivitiIllegalArgumentException(\"deploymentCategory is null\");","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/DeploymentQueryImpl.java#L48-L84","documentation":"DeploymentQueryImpl.deploymentName() throws ActivitiIllegalArgumentException when the deploymentName argument is null. The query API requires an actual name value to build the WHERE clause; null is not treated as 'no filter'. Pass an empty filter chain instead by not calling the method.","triggerScenarios":"Calling repositoryService.createDeploymentQuery().deploymentName(null), usually when the name originates from a nullable variable, config value, or optional user input.","commonSituations":"Search forms where the name field is optional; code copied from examples with a hardcoded string later replaced by a nullable parameter; bean property defaults of null.","solutions":["Pass a non-null name to deploymentName()","Guard with a null check and only add the filter when a name is present","Verify the variable holding the name is populated before querying","Use deploymentNameLike() with a non-null pattern if partial matching is intended (also must be non-null)"],"exampleFix":"// before\nDeployment d = repositoryService.createDeploymentQuery().deploymentName(name).singleResult();\n// after\nif (name == null) {\n    throw new IllegalArgumentException(\"deploymentName must be provided\");\n}\nDeployment d = repositoryService.createDeploymentQuery().deploymentName(name).singleResult();","handlingStrategy":"validation","validationCode":"if (deploymentName == null) { throw new IllegalArgumentException(\"deploymentName must not be null\"); }\nrepositoryService.createDeploymentQuery().deploymentName(deploymentName)...","typeGuard":"boolean hasText(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try {\n    repositoryService.createDeploymentQuery().deploymentName(name).list();\n} catch (ActivitiIllegalArgumentException e) {\n    log.error(\"deploymentName was null\", e);\n}","preventionTips":["Validate search inputs before building queries","Only add optional filters when the value is present","Document that query filter methods reject null"],"tags":["java","activiti","null-argument","query"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}