{"record":{"id":"fa6b95c96caaeba0","repo":"flowable/flowable-engine","slug":"task-namelike-is-null","errorCode":null,"errorMessage":"Task namelike is null","messagePattern":"Task namelike is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java","lineNumber":323,"sourceCode":"\n        final int nameListSize = nameList.size();\n        final Collection<String> caseIgnoredNameList = new ArrayList<>(nameListSize);\n        for (String name : nameList) {\n            caseIgnoredNameList.add(name.toLowerCase());\n        }\n\n        if (orActive) {\n            this.currentOrQueryObject.nameListIgnoreCase = caseIgnoredNameList;\n        } else {\n            this.nameListIgnoreCase = caseIgnoredNameList;\n        }\n        return this;\n    }\n\n    @Override\n    public TaskQueryImpl taskNameLike(String nameLike) {\n        if (nameLike == null) {\n            throw new FlowableIllegalArgumentException(\"Task namelike is null\");\n        }\n\n        if (orActive) {\n            currentOrQueryObject.nameLike = nameLike;\n        } else {\n            this.nameLike = nameLike;\n        }\n        return this;\n    }\n\n    @Override\n    public TaskQuery taskNameLikeIgnoreCase(String nameLikeIgnoreCase) {\n        if (nameLikeIgnoreCase == null) {\n            throw new FlowableIllegalArgumentException(\"Task nameLikeIgnoreCase is null\");\n        }\n\n        if (orActive) {\n            currentOrQueryObject.nameLikeIgnoreCase = nameLikeIgnoreCase.toLowerCase();","sourceCodeStart":305,"sourceCodeEnd":341,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/TaskQueryImpl.java#L305-L341","documentation":"Thrown by TaskQuery.taskNameLike(String) when the nameLike argument is null. Flowable validates that a wildcard pattern is actually supplied before storing it on the query, throwing FlowableIllegalArgumentException at build time; a null pattern would otherwise produce an undefined SQL LIKE condition.","triggerScenarios":"Calling taskQuery.taskNameLike(null), typically when the pattern variable comes from an optional request parameter or config value that is absent.","commonSituations":"Passing a search box value straight through without a null check; a lookup that returns null when no pattern was configured; overloads/refactors where the caller assumed null means 'no filter'.","solutions":["Check for null before calling; skip the taskNameLike filter entirely when the pattern is absent","Normalize input upstream (empty string -> skip filter, or handle as explicit business rule)","For 'no filter' semantics, branch around the call instead of passing null"],"exampleFix":"// before\nquery.taskNameLike(pattern); // pattern may be null\n// after\nif (pattern != null && !pattern.isEmpty()) {\n    query.taskNameLike(pattern);\n}","handlingStrategy":"validation","validationCode":"if (pattern != null && !pattern.isEmpty()) {\n    query.taskNameLike(pattern);\n}","typeGuard":null,"tryCatchPattern":"try {\n    query.taskNameLike(pattern);\n} catch (FlowableIllegalArgumentException e) {\n    // pattern was null; run query without the LIKE filter\n}","preventionTips":["Guard optional pattern parameters before passing to Flowable query methods","Treat null/blank as 'skip this filter', enforced at one helper method","Sanitize user-supplied patterns at the API boundary"],"tags":["flowable","task-query","null-argument","validation"],"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"}