{"record":{"id":"2869e8673168d3b2","repo":"flowable/flowable-engine","slug":"namelike-is-null-2869e8","errorCode":null,"errorMessage":"nameLike is null","messagePattern":"nameLike is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CaseDefinitionQueryImpl.java","lineNumber":132,"sourceCode":"            throw new FlowableIllegalArgumentException(\"categoryNotEquals is null\");\n        }\n        this.categoryNotEquals = categoryNotEquals;\n        return this;\n    }\n\n    @Override\n    public CaseDefinitionQueryImpl caseDefinitionName(String name) {\n        if (name == null) {\n            throw new FlowableIllegalArgumentException(\"name is null\");\n        }\n        this.name = name;\n        return this;\n    }\n\n    @Override\n    public CaseDefinitionQueryImpl caseDefinitionNameLike(String nameLike) {\n        if (nameLike == null) {\n            throw new FlowableIllegalArgumentException(\"nameLike is null\");\n        }\n        this.nameLike = nameLike;\n        return this;\n    }\n\n    @Override\n    public CaseDefinitionQueryImpl caseDefinitionNameLikeIgnoreCase(String nameLikeIgnoreCase) {\n        if (nameLikeIgnoreCase == null) {\n            throw new FlowableIllegalArgumentException(\"nameLikeIgnoreCase is null\");\n        }\n        this.nameLikeIgnoreCase = nameLikeIgnoreCase;\n        return this;\n    }\n\n    @Override\n    public CaseDefinitionQueryImpl deploymentId(String deploymentId) {\n        if (deploymentId == null) {\n            throw new FlowableIllegalArgumentException(\"id is null\");","sourceCodeStart":114,"sourceCodeEnd":150,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CaseDefinitionQueryImpl.java#L114-L150","documentation":"FlowableIllegalArgumentException thrown by CaseDefinitionQueryImpl.caseDefinitionNameLike(String) when the nameLike pattern is null. Like-style filters accept SQL wildcards (%, _) but never null; the engine validates eagerly so the query fails at build time instead of generating invalid SQL. To match all definitions, simply do not call the setter.","triggerScenarios":"Calling repositoryService.createCaseDefinitionQuery().caseDefinitionNameLike(null), typically when a search pattern variable is uninitialized.","commonSituations":"Search UIs where the user typed no pattern; code that builds \"name LIKE ?\" clauses from an optional input and forwards the null value.","solutions":["Pass a non-null like pattern, e.g. caseDefinitionNameLike(\"%order%\").","Only invoke caseDefinitionNameLike when the pattern is non-null/non-empty.","If null means 'match all', omit the setter rather than passing null."],"exampleFix":"// before\nquery.caseDefinitionNameLike(pattern); // pattern may be null\n\n// after\nif (pattern != null && !pattern.isEmpty()) {\n    query.caseDefinitionNameLike(\"%\" + pattern + \"%\");\n}","handlingStrategy":"validation","validationCode":"if (nameLike != null && !nameLike.isEmpty()) {\n    query.caseDefinitionNameLike(nameLike);\n}","typeGuard":"boolean hasPattern = nameLike != null && !nameLike.isEmpty();","tryCatchPattern":"try {\n    query.caseDefinitionNameLike(nameLike);\n} catch (FlowableIllegalArgumentException e) {\n    // pattern was null — skip filter or use a default pattern\n}","preventionTips":["Apply like-pattern filters only for non-empty user input.","Decide explicitly what null/empty search input means (match-all vs match-none) and encode that before building the query."],"tags":["flowable","cmmn","query","like-pattern","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-14T11:17:12.474Z"}