{"record":{"id":"5961b4d8b6b1f913","repo":"flowable/flowable-engine","slug":"task-assignee-list-is-null-5961b4","errorCode":null,"errorMessage":"Task assignee list is null","messagePattern":"Task assignee list is null","errorType":"validation","errorClass":"ActivitiIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/TaskQueryImpl.java","lineNumber":378,"sourceCode":"    }\n\n    @Override\n    public TaskQuery taskAssigneeLikeIgnoreCase(String assigneeLikeIgnoreCase) {\n        if (assigneeLikeIgnoreCase == null) {\n            throw new ActivitiIllegalArgumentException(\"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(List<String> assigneeIds) {\n        if (assigneeIds == null) {\n            throw new ActivitiIllegalArgumentException(\"Task assignee list is null\");\n        }\n        if (assigneeIds.isEmpty()) {\n            throw new ActivitiIllegalArgumentException(\"Task assignee list is empty\");\n        }\n        for (String assignee : assigneeIds) {\n            if (assignee == null) {\n                throw new ActivitiIllegalArgumentException(\"None of the given task assignees can be null\");\n            }\n        }\n\n        if (assignee != null) {\n            throw new ActivitiIllegalArgumentException(\"Invalid query usage: cannot set both taskAssigneeIds and taskAssignee\");\n        }\n        if (assigneeLike != null) {\n            throw new ActivitiIllegalArgumentException(\"Invalid query usage: cannot set both taskAssigneeIds and taskAssigneeLike\");\n        }\n        if (assigneeLikeIgnoreCase != null) {\n            throw new ActivitiIllegalArgumentException(\"Invalid query usage: cannot set both taskAssigneeIds and taskAssigneeLikeIgnoreCase\");","sourceCodeStart":360,"sourceCodeEnd":396,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/TaskQueryImpl.java#L360-L396","documentation":"Thrown by TaskQueryImpl.taskAssigneeIds(List<String>) when the assigneeIds list itself is null. The method builds an IN-clause over the given assignee ids; a null list is invalid input, so the query builder rejects it immediately with ActivitiIllegalArgumentException.","triggerScenarios":"Calling taskQuery.taskAssigneeIds(null) or passing a collection variable that was never initialized / came back null from a service or mapper.","commonSituations":"A bulk 'tasks for these users' screen where the selected-users collection is null; group membership lookup returning null instead of an empty list; JSON deserialization leaving the ids field unset.","solutions":["Pass a non-null, non-empty List<String> of assignee ids.","Guard the call: only invoke taskAssigneeIds when the list is non-null.","Return Collections.emptyList() (and skip the filter) instead of null from the lookup.","Initialize the collection field in the DTO/filter object.","Catch ActivitiIllegalArgumentException at the boundary and report invalid input."],"exampleFix":"// before\nList<String> ids = getSelectedUserIds(); // may be null\nquery.taskAssigneeIds(ids);\n\n// after\nList<String> ids = getSelectedUserIds();\nif (ids != null && !ids.isEmpty()) {\n    query.taskAssigneeIds(ids);\n}","handlingStrategy":"validation","validationCode":"if (assigneeIds != null && !assigneeIds.isEmpty()) {\n    query.taskAssigneeIds(assigneeIds);\n}","typeGuard":"boolean isNonEmptyList(List<String> l) { return l != null && !l.isEmpty(); }","tryCatchPattern":"try {\n    query.taskAssigneeIds(assigneeIds);\n} catch (ActivitiIllegalArgumentException e) {\n    throw new BadRequestException(\"Assignee ids invalid: \" + e.getMessage());\n}","preventionTips":["Return empty lists, never null, from id-collection methods.","Skip the ids filter when the collection is null/empty.","Initialize collection fields in filter DTOs."],"tags":["java","flowable","task-query","null-argument","assignee"],"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"}