{"record":{"id":"c549d3e8a162f51e","repo":"flowable/flowable-engine","slug":"description-is-null","errorCode":null,"errorMessage":"Description is null","messagePattern":"Description is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java","lineNumber":351,"sourceCode":"\n    @Override\n    public TaskQuery taskNameLikeIgnoreCase(String nameLikeIgnoreCase) {\n        if (nameLikeIgnoreCase == null) {\n            throw new FlowableIllegalArgumentException(\"Task nameLikeIgnoreCase is null\");\n        }\n\n        if (orActive) {\n            currentOrQueryObject.nameLikeIgnoreCase = nameLikeIgnoreCase.toLowerCase();\n        } else {\n            this.nameLikeIgnoreCase = nameLikeIgnoreCase.toLowerCase();\n        }\n        return this;\n    }\n\n    @Override\n    public TaskQueryImpl taskDescription(String description) {\n        if (description == null) {\n            throw new FlowableIllegalArgumentException(\"Description is null\");\n        }\n\n        if (orActive) {\n            currentOrQueryObject.description = description;\n        } else {\n            this.description = description;\n        }\n        return this;\n    }\n\n    @Override\n    public TaskQuery taskDescriptionLike(String descriptionLike) {\n        if (descriptionLike == null) {\n            throw new FlowableIllegalArgumentException(\"Task descriptionlike is null\");\n        }\n        if (orActive) {\n            currentOrQueryObject.descriptionLike = descriptionLike;\n        } else {","sourceCodeStart":333,"sourceCodeEnd":369,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java#L333-L369","documentation":"TaskQueryImpl.taskDescription() rejects a null description with FlowableIllegalArgumentException. Description is an exact-match filter on the task's description column; a null argument cannot express a meaningful equality predicate, so the library fails fast at query-build time instead of producing a broken query.","triggerScenarios":"Calling taskQuery.taskDescription(null) directly, or via dynamic query builders that forward an unset/unbound description field.","commonSituations":"Search forms where the description box was left blank and the raw value was forwarded; deserialized DTOs missing the description property; code that assumed an empty string would be passed instead of null.","solutions":["Check for null before adding the criterion and skip the filter when absent.","Coerce blank input to \"\" if an exact empty-description match is intended.","Make the DTO field default to \"\" so binding never yields null.","Wrap query construction in try-catch on FlowableIllegalArgumentException and surface a validation error."],"exampleFix":"// before\nquery.taskDescription(criteria.getDescription());\n// after\nif (criteria.getDescription() != null) {\n    query.taskDescription(criteria.getDescription());\n}","handlingStrategy":"validation","validationCode":"if (description != null) {\n    query.taskDescription(description);\n}","typeGuard":"boolean isPresent(String s) { return s != null; }","tryCatchPattern":"try {\n    query.taskDescription(description);\n} catch (FlowableIllegalArgumentException e) {\n    throw new BadRequestException(\"description filter must not be null\", e);\n}","preventionTips":["Treat null as 'no filter' in your own filter DTOs and skip the setter.","Distinguish 'no filter' (skip) from 'match empty string' (pass \"\").","Default DTO string fields to \"\" where an exact empty match is meaningful.","Add unit tests covering optional-filter combinations."],"tags":["flowable","task-query","null-argument","validation"],"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"}