{"record":{"id":"4727a95c0452639c","repo":"flowable/flowable-engine","slug":"deploymentname-is-null-4727a9","errorCode":null,"errorMessage":"deploymentName is null","messagePattern":"deploymentName 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":81,"sourceCode":"            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\");\n        }\n        this.nameLike = nameLike;\n        return this;\n    }\n\n    @Override\n    public CmmnDeploymentQueryImpl deploymentCategory(String deploymentCategory) {\n        if (deploymentCategory == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentCategory is null\");","sourceCodeStart":63,"sourceCodeEnd":99,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CmmnDeploymentQueryImpl.java#L63-L99","documentation":"FlowableIllegalArgumentException thrown by CmmnDeploymentQueryImpl.deploymentName when the deploymentName argument is null. The exact-name filter requires a non-null string; null is not accepted as 'no filter'. Fail-fast validation on the query builder.","triggerScenarios":"Calling createDeploymentQuery().deploymentName(null), usually because the name came from an unset configuration value, empty request parameter mapped to null, or unpopulated variable.","commonSituations":"Optional name filters where null should mean 'no filter', form/API inputs not defaulted, config keys missing that feed the query.","solutions":["Pass a non-null name string, or omit the deploymentName() call entirely when filtering by name is optional","Default the value to a concrete string if a name is always required","Validate upstream input so null never reaches the query"],"exampleFix":"// before\nquery.deploymentName(nameParam); // may be null\n// after\nif (nameParam != null) { query.deploymentName(nameParam); } // or deploymentNameLike(nameParam)","handlingStrategy":"validation","validationCode":"if (name != null) { query.deploymentName(name); }","typeGuard":"static boolean hasDeploymentName(String name) { return name != null && !name.trim().isEmpty(); }","tryCatchPattern":"try {\n    query.deploymentName(name);\n} catch (FlowableIllegalArgumentException e) {\n    if (\"deploymentName is null\".equals(e.getMessage())) {\n        throw new IllegalArgumentException(\"deploymentName must not be null; omit the filter instead\", e);\n    }\n    throw e;\n}","preventionTips":["Make optional name filters conditional on non-null input","Default request/config values to empty-string-plus-skip rather than null","Document that null means invalid, not 'match all'","Sanitize user input before passing it into queries"],"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"}