{"record":{"id":"e70da16ec05baf70","repo":"flowable/flowable-engine","slug":"task-descriptionlikeignorecase-is-null","errorCode":null,"errorMessage":"Task descriptionLikeIgnoreCase is null","messagePattern":"Task descriptionLikeIgnoreCase 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":378,"sourceCode":"    }\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 {\n            this.descriptionLike = descriptionLike;\n        }\n        return this;\n    }\n\n    @Override\n    public TaskQuery taskDescriptionLikeIgnoreCase(String descriptionLikeIgnoreCase) {\n        if (descriptionLikeIgnoreCase == null) {\n            throw new FlowableIllegalArgumentException(\"Task descriptionLikeIgnoreCase is null\");\n        }\n        if (orActive) {\n            currentOrQueryObject.descriptionLikeIgnoreCase = descriptionLikeIgnoreCase.toLowerCase();\n        } else {\n            this.descriptionLikeIgnoreCase = descriptionLikeIgnoreCase.toLowerCase();\n        }\n        return this;\n    }\n\n    @Override\n    public TaskQuery taskPriority(Integer priority) {\n        if (priority == null) {\n            throw new FlowableIllegalArgumentException(\"Priority is null\");\n        }\n        if (orActive) {\n            currentOrQueryObject.priority = priority;\n        } else {\n            this.priority = priority;","sourceCodeStart":360,"sourceCodeEnd":396,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java#L360-L396","documentation":"TaskQuery.taskDescriptionLikeIgnoreCase() throws FlowableIllegalArgumentException when the argument is null. Besides being non-null, the value is lowercased by the method itself to enable case-insensitive matching, so it must be a real string before the call.","triggerScenarios":"Calling taskDescriptionLikeIgnoreCase(null); passing an optional filter from a search request where the parameter was absent.","commonSituations":"Case-insensitive search endpoints with optional description filters; upstream services sending JSON objects without the field, deserialized to null.","solutions":["Skip the criterion when the value is null (conditional query building).","Provide a default non-null pattern value at the DTO/controller layer.","Use Optional.ofNullable(desc).ifPresent(query::taskDescriptionLikeIgnoreCase) style guards.","Catch FlowableIllegalArgumentException at the boundary and return 400."],"exampleFix":"// before\nquery.taskDescriptionLikeIgnoreCase(filter);\n// after\nif (filter != null) {\n    query.taskDescriptionLikeIgnoreCase(filter);\n}","handlingStrategy":"validation","validationCode":"if (descriptionLikeIgnoreCase != null) {\n    query.taskDescriptionLikeIgnoreCase(descriptionLikeIgnoreCase);\n}","typeGuard":"boolean hasText(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try {\n    query.taskDescriptionLikeIgnoreCase(value);\n} catch (FlowableIllegalArgumentException e) {\n    throw new BadRequestException(\"descriptionLikeIgnoreCase must not be null\", e);\n}","preventionTips":["Guard all IgnoreIgnoreCase criteria: they require non-null values for toLowerCase().","Normalize optional filters to absent (skip) rather than null (throw).","Keep filter-building code in one place so null checks are never forgotten.","Cover optional-filter paths with tests that pass null explicitly."],"tags":["flowable","task-query","null-argument","case-insensitive"],"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"}