{"record":{"id":"c6740dcf6ee48057","repo":"flowable/flowable-engine","slug":"none-of-the-given-task-assignees-can-be-null","errorCode":null,"errorMessage":"None of the given task assignees can be null","messagePattern":"None of the given task assignees can be null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/HistoricTaskInstanceQueryImpl.java","lineNumber":947,"sourceCode":"            this.currentOrQueryObject.withAssignee = true;\n        }\n        else {\n            this.withAssignee = true;\n        }\n        return this;\n    }\n\n    @Override\n    public HistoricTaskInstanceQuery 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) {\n            if (assignee == null) {\n                throw new FlowableIllegalArgumentException(\"None of the given task assignees can be null\");\n            }\n        }\n\n        if (taskAssignee != null) {\n            throw new FlowableIllegalArgumentException(\"Invalid query usage: cannot set both taskAssigneeIds and taskAssignee\");\n        }\n        if (taskAssigneeLike != null) {\n            throw new FlowableIllegalArgumentException(\"Invalid query usage: cannot set both taskAssigneeIds and taskAssigneeLike\");\n        }\n        if (taskAssigneeLikeIgnoreCase != null) {\n            throw new FlowableIllegalArgumentException(\"Invalid query usage: cannot set both taskAssigneeIds and taskAssigneeLikeIgnoreCase\");\n        }\n\n        if (inOrStatement) {\n            currentOrQueryObject.taskAssigneeIds = assigneeIds;\n        } else {\n            this.taskAssigneeIds = assigneeIds;\n        }","sourceCodeStart":929,"sourceCodeEnd":965,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/HistoricTaskInstanceQueryImpl.java#L929-L965","documentation":"Flowable throws this when taskTaskAssigneeIds(...) (assignee-id list query) is called with a list containing at least one null element. The library validates every entry eagerly so a malformed IN-clause is never sent to the database. It is an immediate argument-validation failure, not a state or runtime issue.","triggerScenarios":"Calling HistoricTaskInstanceQuery.taskTaskAssigneeIds(Collection<String>) with a collection that contains a null element (e.g. a List built from a sparse map or split string with trailing separators).","commonSituations":"Collecting assignee ids from a database/HTTP join where some rows have NULL assignee; building the list from user input without filtering blanks; deserializing JSON arrays containing nulls.","solutions":["Filter null (and blank) entries before calling taskTaskAssigneeIds","Ensure upstream data does not produce null assignee ids (fix the query/source)","If you truly have no assignees, skip setting the filter instead of passing a list of nulls"],"exampleFix":"// before\nquery.taskTaskAssigneeIds(assigneeIds); // list may contain nulls\n// after\nList<String> clean = assigneeIds.stream().filter(Objects::nonNull).collect(Collectors.toList());\nif (!clean.isEmpty()) { query.taskTaskAssigneeIds(clean); }","handlingStrategy":"validation","validationCode":"List<String> safeAssignees = assigneeIds == null ? Collections.emptyList() : assigneeIds.stream().filter(Objects::nonNull).collect(Collectors.toList());\nif (safeAssignees.isEmpty()) throw new IllegalArgumentException(\"assigneeIds must contain at least one non-null id\");","typeGuard":"boolean isValidAssigneeIds(Collection<String> ids) {\n    return ids != null && !ids.isEmpty() && ids.stream().allMatch(Objects::nonNull);\n}","tryCatchPattern":"try {\n    query.taskTaskAssigneeIds(assigneeIds);\n} catch (FlowableIllegalArgumentException e) {\n    // fall back to no assignee filter or corrected list\n}","preventionTips":["Always filter nulls from id collections before passing to Flowable query setters","Validate collections at the API/DTO boundary before they reach query construction","Prefer Optional/stream filtering over raw collections from external sources"],"tags":["query","validation","null"],"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"}