{"record":{"id":"d03382ea0aa20e50","repo":"flowable/flowable-engine","slug":"assigneelikeignorecase-is-null","errorCode":null,"errorMessage":"assigneeLikeIgnoreCase is null","messagePattern":"assigneeLikeIgnoreCase is null","errorType":"exception","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java","lineNumber":456,"sourceCode":"    }\n\n    @Override\n    public TaskQueryImpl taskAssigneeLike(String assigneeLike) {\n        if (assigneeLike == null) {\n            throw new FlowableIllegalArgumentException(\"AssigneeLike is null\");\n        }\n        if (orActive) {\n            currentOrQueryObject.assigneeLike = assigneeLike;\n        } else {\n            this.assigneeLike = assigneeLike;\n        }\n        return this;\n    }\n\n    @Override\n    public TaskQuery taskAssigneeLikeIgnoreCase(String assigneeLikeIgnoreCase) {\n        if (assigneeLikeIgnoreCase == null) {\n            throw new FlowableIllegalArgumentException(\"assigneeLikeIgnoreCase is null\");\n        }\n        if (orActive) {\n            currentOrQueryObject.assigneeLikeIgnoreCase = assigneeLikeIgnoreCase.toLowerCase();\n        } else {\n            this.assigneeLikeIgnoreCase = assigneeLikeIgnoreCase.toLowerCase();\n        }\n        return this;\n    }\n\n    @Override\n    public TaskQuery taskAssigneeIds(Collection<String> assigneeIds) {\n        if (assigneeIds == null) {\n            throw new FlowableIllegalArgumentException(\"Task assignee list is null\");\n        }\n        if (assigneeIds.isEmpty()) {\n            throw new FlowableIllegalArgumentException(\"Task assignee list is empty\");\n        }\n        for (String assignee : assigneeIds) {","sourceCodeStart":438,"sourceCodeEnd":474,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java#L438-L474","documentation":"TaskQuery.taskAssigneeLikeIgnoreCase(String) throws FlowableIllegalArgumentException when the argument is null. The method lowercases the value for case-insensitive matching, which requires a non-null string; the null check happens before toLowerCase to avoid an NPE.","triggerScenarios":"Calling taskAssigneeLikeIgnoreCase(null), commonly from optional case-insensitive assignee search parameters.","commonSituations":"Search endpoints with optional assignee filters; JSON payloads omitting the field so it deserializes to null; shared filter builders that call every setter unconditionally.","solutions":["Apply the criterion only when the value is non-null.","Use Optional.ofNullable(assigneePart).ifPresent(query::taskAssigneeLikeIgnoreCase) style guards.","Normalize the filter DTO so absent values default to a non-null sentinel or are dropped before query building.","Catch FlowableIllegalArgumentException at the API boundary and return 400."],"exampleFix":"// before\nquery.taskAssigneeLikeIgnoreCase(filter.getAssignee());\n// after\nif (filter.getAssignee() != null) {\n    query.taskAssigneeLikeIgnoreCase(filter.getAssignee());\n}","handlingStrategy":"validation","validationCode":"if (assigneeLikeIgnoreCase != null) {\n    query.taskAssigneeLikeIgnoreCase(assigneeLikeIgnoreCase);\n}","typeGuard":"boolean hasText(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try {\n    query.taskAssigneeLikeIgnoreCase(value);\n} catch (FlowableIllegalArgumentException e) {\n    throw new BadRequestException(\"assigneeLikeIgnoreCase must not be null\", e);\n}","preventionTips":["Null-check before all IgnoreIgnoreCase setters — they call toLowerCase() on the input.","Use Optional-based filters so absence is explicit and setters are skipped.","Normalize request payloads so missing JSON fields become 'no filter', not null propagation.","Keep one shared guard utility for all TaskQuery criteria."],"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"}