{"record":{"id":"a6f8d87f6423e6a0","repo":"flowable/flowable-engine","slug":"namelikeignorecase-is-null-a6f8d8","errorCode":null,"errorMessage":"nameLikeIgnoreCase is null","messagePattern":"nameLikeIgnoreCase is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/ProcessDefinitionQueryImpl.java","lineNumber":148,"sourceCode":"            throw new FlowableIllegalArgumentException(\"name is null\");\n        }\n        this.name = name;\n        return this;\n    }\n\n    @Override\n    public ProcessDefinitionQueryImpl processDefinitionNameLike(String nameLike) {\n        if (nameLike == null) {\n            throw new FlowableIllegalArgumentException(\"nameLike is null\");\n        }\n        this.nameLike = nameLike;\n        return this;\n    }\n\n    @Override\n    public ProcessDefinitionQueryImpl processDefinitionNameLikeIgnoreCase(String nameLikeIgnoreCase) {\n        if (nameLikeIgnoreCase == null) {\n            throw new FlowableIllegalArgumentException(\"nameLikeIgnoreCase is null\");\n        }\n        this.nameLikeIgnoreCase = nameLikeIgnoreCase;\n        return this;\n    }\n\n    @Override\n    public ProcessDefinitionQueryImpl deploymentId(String deploymentId) {\n        if (deploymentId == null) {\n            throw new FlowableIllegalArgumentException(\"id is null\");\n        }\n        this.deploymentId = deploymentId;\n        return this;\n    }\n\n    @Override\n    public ProcessDefinitionQueryImpl deploymentIds(Set<String> deploymentIds) {\n        if (deploymentIds == null) {\n            throw new FlowableIllegalArgumentException(\"ids are null\");","sourceCodeStart":130,"sourceCodeEnd":166,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/ProcessDefinitionQueryImpl.java#L130-L166","documentation":"Flowable throws FlowableIllegalArgumentException when processDefinitionNameLikeIgnoreCase(null) is called. Case-insensitive like filters must receive a concrete pattern string; null cannot be translated into a valid SQL LIKE clause. The check happens immediately in the query builder to fail fast.","triggerScenarios":"Calling repositoryService.createProcessDefinitionQuery().processDefinitionNameLikeIgnoreCase(null), typically when the ignore-case variant was substituted for processDefinitionNameLike and the source variable was never set.","commonSituations":"Migrating queries to case-insensitive matching and forgetting that the new method has the same null guard; optional search boxes whose value is null rather than empty string; DTOs with unpopulated filter fields.","solutions":["Provide a non-null pattern, e.g. processDefinitionNameLikeIgnoreCase(\"%report%\").","Conditionally apply the filter only when the value is non-null.","Normalize nulls to a sentinel before calling (though skipping the filter is usually better than a catch-all pattern)."],"exampleFix":"// before\nquery.processDefinitionNameLikeIgnoreCase(searchTerm);\n// after\nif (searchTerm != null && !searchTerm.isEmpty()) {\n    query.processDefinitionNameLikeIgnoreCase(\"%\" + searchTerm.toLowerCase() + \"%\");\n}","handlingStrategy":"validation","validationCode":"if (nameLikeIgnoreCase != null && !nameLikeIgnoreCase.isEmpty()) {\n    query.processDefinitionNameLikeIgnoreCase(nameLikeIgnoreCase.toLowerCase());\n}","typeGuard":"boolean hasText(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try {\n    query.processDefinitionNameLikeIgnoreCase(term);\n} catch (org.flowable.common.engine.api.FlowableIllegalArgumentException e) {\n    log.warn(\"Ignoring null/invalid nameLikeIgnoreCase filter\");\n}","preventionTips":["Default optional search terms to empty/null-safe handling in your DTO layer","Lowercase patterns yourself so behavior is predictable","Add unit tests covering null filter inputs for every query builder you use"],"tags":["flowable","null-argument","query-builder","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-14T05:17:10.506Z"}