{"record":{"id":"25080e9a94c60687","repo":"flowable/flowable-engine","slug":"assigneelike-is-null","errorCode":null,"errorMessage":"AssigneeLike is null","messagePattern":"AssigneeLike 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":443,"sourceCode":"    }\n\n    @Override\n    public TaskQueryImpl taskAssignee(String assignee) {\n        if (assignee == null) {\n            throw new FlowableIllegalArgumentException(\"Assignee is null\");\n        }\n        if (orActive) {\n            currentOrQueryObject.assignee = assignee;\n        } else {\n            this.assignee = assignee;\n        }\n        return this;\n    }\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();","sourceCodeStart":425,"sourceCodeEnd":461,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java#L425-L461","documentation":"TaskQueryImpl.taskAssigneeLike(String) throws FlowableIllegalArgumentException when assigneeLike is null. It is a LIKE-pattern filter on assignee; null patterns are rejected at build time rather than producing invalid SQL.","triggerScenarios":"Calling taskAssigneeLike(null), usually when the pattern is derived from optional user input or concatenated wildcard strings built from a null base value.","commonSituations":"Assignee search boxes with optional input; building \"%domain\\\\\" style patterns from a null tenant/user variable; client payloads missing the assigneeLike field.","solutions":["Only add the assigneeLike criterion when the pattern is non-null.","Build the pattern defensively and skip when the base value is missing.","Default to \"%\" if match-all assignees is the intended behavior.","Catch FlowableIllegalArgumentException and return a validation error."],"exampleFix":"// before\nquery.taskAssigneeLike(\"%\" + userPart + \"%\");\n// after\nif (userPart != null) {\n    query.taskAssigneeLike(\"%\" + userPart + \"%\");\n}","handlingStrategy":"validation","validationCode":"if (assigneeLike != null) {\n    query.taskAssigneeLike(assigneeLike);\n}","typeGuard":"boolean isLikePattern(String s) { return s != null && !s.isEmpty(); }","tryCatchPattern":"try {\n    query.taskAssigneeLike(pattern);\n} catch (FlowableIllegalArgumentException e) {\n    throw new BadRequestException(\"assigneeLike pattern must not be null\", e);\n}","preventionTips":["Build patterns null-safely; concatenating \"%\" + null produces \"null\" or a throw depending on order.","Escape wildcard characters in user input.","Skip the criterion when the search input is absent.","Test search endpoints with missing parameters."],"tags":["flowable","task-query","null-argument","like-filter"],"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"}