{"record":{"id":"33830d45275e2945","repo":"flowable/flowable-engine","slug":"assigneelikeignorecase-is-null-33830d","errorCode":null,"errorMessage":"assigneeLikeIgnoreCase is null","messagePattern":"assigneeLikeIgnoreCase is null","errorType":"validation","errorClass":"ActivitiIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/TaskQueryImpl.java","lineNumber":365,"sourceCode":"    }\n\n    @Override\n    public TaskQueryImpl taskAssigneeLike(String assigneeLike) {\n        if (assigneeLike == null) {\n            throw new ActivitiIllegalArgumentException(\"AssigneeLike is null\");\n        }\n        if (orActive) {\n            currentOrQueryObject.assigneeLike = assignee;\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 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) {","sourceCodeStart":347,"sourceCodeEnd":383,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/TaskQueryImpl.java#L347-L383","documentation":"Thrown by TaskQueryImpl.taskAssigneeLikeIgnoreCase(String) when the assigneeLikeIgnoreCase argument is null. This setter lower-cases the pattern for case-insensitive LIKE matching; calling toLowerCase() on null would NPE, so an explicit ActivitiIllegalArgumentException check precedes it.","triggerScenarios":"Calling taskQuery.taskAssigneeLikeIgnoreCase(null) or supplying a null search term from an unset filter/request parameter.","commonSituations":"Case-insensitive search feature wired to an optional input that the client omitted; migration from taskAssigneeLike to its ignore-case variant without adjusting null handling.","solutions":["Pass a non-null pattern (it will be lower-cased internally).","Skip the filter when the term is null: if (term != null) query.taskAssigneeLikeIgnoreCase(term);","Default the term to an empty/wildcard string when appropriate.","Add bean validation (@NotBlank) on the DTO field feeding the query."],"exampleFix":"// before\nquery.taskAssigneeLikeIgnoreCase(filter.getAssigneePattern());\n\n// after\nString pattern = filter.getAssigneePattern();\nif (pattern != null) {\n    query.taskAssigneeLikeIgnoreCase(pattern);\n}","handlingStrategy":"validation","validationCode":"if (pattern != null && !pattern.trim().isEmpty()) {\n    query.taskAssigneeLikeIgnoreCase(pattern.trim());\n}","typeGuard":"boolean hasIgnoreCasePattern(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try {\n    query.taskAssigneeLikeIgnoreCase(pattern);\n} catch (ActivitiIllegalArgumentException e) {\n    throw new BadRequestException(\"Assignee pattern invalid: \" + e.getMessage());\n}","preventionTips":["Guard the term before calling; the setter lower-cases internally.","Use bean validation (@NotBlank) on DTO fields feeding ignore-case filters.","Standardize null-to-empty handling for all optional search inputs."],"tags":["java","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"}