{"record":{"id":"d5684c58672626e8","repo":"flowable/flowable-engine","slug":"ownerlikeignorecase-d5684c","errorCode":null,"errorMessage":"OwnerLikeIgnoreCase","messagePattern":"OwnerLikeIgnoreCase","errorType":"validation","errorClass":"ActivitiIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/TaskQueryImpl.java","lineNumber":436,"sourceCode":"    }\n\n    @Override\n    public TaskQueryImpl taskOwnerLike(String ownerLike) {\n        if (ownerLike == null) {\n            throw new ActivitiIllegalArgumentException(\"Owner is null\");\n        }\n        if (orActive) {\n            currentOrQueryObject.ownerLike = ownerLike;\n        } else {\n            this.ownerLike = ownerLike;\n        }\n        return this;\n    }\n\n    @Override\n    public TaskQuery taskOwnerLikeIgnoreCase(String ownerLikeIgnoreCase) {\n        if (ownerLikeIgnoreCase == null) {\n            throw new ActivitiIllegalArgumentException(\"OwnerLikeIgnoreCase\");\n        }\n        if (orActive) {\n            currentOrQueryObject.ownerLikeIgnoreCase = ownerLikeIgnoreCase.toLowerCase();\n        } else {\n            this.ownerLikeIgnoreCase = ownerLikeIgnoreCase.toLowerCase();\n        }\n        return this;\n    }\n\n    /**\n     * @see #taskUnassigned\n     */\n    @Override\n    @Deprecated\n    public TaskQuery taskUnnassigned() {\n        return taskUnassigned();\n    }\n","sourceCodeStart":418,"sourceCodeEnd":454,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/TaskQueryImpl.java#L418-L454","documentation":"taskOwnerLikeIgnoreCase(String ownerLikeIgnoreCase) throws ActivitiIllegalArgumentException(\"OwnerLikeIgnoreCase\") when its argument is null. The method lowercases the pattern before storing it to implement case-insensitive matching, and null cannot be lowercased or turned into a LIKE condition. Pass a non-null pattern string.","triggerScenarios":"Calling taskQuery.taskOwnerLikeIgnoreCase(null); often the argument is a computed or user-supplied value that was null at call time.","commonSituations":"Optional search filters from web forms; configuration keys that were not set; refactoring from taskOwnerLike to the IgnoreCase variant without adding null handling.","solutions":["Guard with a null check before calling, or only add the filter when the value exists","Lowercase your input yourself only if needed - the method already lowercases it","Fix the source of the null value (config, request param, variable)"],"exampleFix":"// before\nquery.taskOwnerLikeIgnoreCase(searchForm.getOwner()); // throws when null\n// after\nif (searchForm.getOwner() != null) {\n    query.taskOwnerLikeIgnoreCase(searchForm.getOwner());\n}","handlingStrategy":"type-guard","validationCode":"Objects.requireNonNull(ownerLikeIgnoreCase, \"ownerLikeIgnoreCase must not be null\");\nquery.taskOwnerLikeIgnoreCase(ownerLikeIgnoreCase);","typeGuard":"boolean hasIgnoreCasePattern(String p) { return p != null && !p.trim().isEmpty(); }","tryCatchPattern":"try {\n    query.taskOwnerLikeIgnoreCase(pattern);\n} catch (ActivitiIllegalArgumentException e) {\n    log.warn(\"Skipping ignore-case owner filter: {}\", e.getMessage());\n}","preventionTips":["Guard optional filter values before calling IgnoreCase variants","Remember the method lowercases the input; do not pass locale-dependent strings expecting otherwise","Apply null-guards at the search-form/DTO boundary, not deep in business code"],"tags":["task-query","null-argument","query-builder","activiti"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}