{"record":{"id":"25178962ee6e6488","repo":"flowable/flowable-engine","slug":"deploymentnamelike-is-null-251789","errorCode":null,"errorMessage":"deploymentNameLike is null","messagePattern":"deploymentNameLike is null","errorType":"validation","errorClass":"ActivitiIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/DeploymentQueryImpl.java","lineNumber":75,"sourceCode":"            throw new ActivitiIllegalArgumentException(\"Deployment id is null\");\n        }\n        this.deploymentId = deploymentId;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentName(String deploymentName) {\n        if (deploymentName == null) {\n            throw new ActivitiIllegalArgumentException(\"deploymentName is null\");\n        }\n        this.name = deploymentName;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentNameLike(String nameLike) {\n        if (nameLike == null) {\n            throw new ActivitiIllegalArgumentException(\"deploymentNameLike is null\");\n        }\n        this.nameLike = nameLike;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentCategory(String deploymentCategory) {\n        if (deploymentCategory == null) {\n            throw new ActivitiIllegalArgumentException(\"deploymentCategory is null\");\n        }\n        this.category = deploymentCategory;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentCategoryNotEquals(String deploymentCategoryNotEquals) {\n        if (deploymentCategoryNotEquals == null) {\n            throw new ActivitiIllegalArgumentException(\"deploymentCategoryExclude is null\");","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/DeploymentQueryImpl.java#L57-L93","documentation":"DeploymentQueryImpl.deploymentNameLike() throws ActivitiIllegalArgumentException when the nameLike argument is null. A 'like' filter needs a pattern string; null is rejected up front instead of being interpreted as a wildcard or no-op filter.","triggerScenarios":"Calling repositoryService.createDeploymentQuery().deploymentNameLike(null), e.g. building a pattern via String.format/concat where the input prefix is null, or forwarding an optional search term unchecked.","commonSituations":"Dynamic search builders that always call every filter method; null search terms from web forms; concatenation producing null when the base variable is null.","solutions":["Pass a non-null pattern, e.g. deploymentNameLike(\"%\" + term + \"%\") with term non-null","Only call deploymentNameLike() when the search term is present","Default the term to an empty-safe value before building the pattern","Check upstream normalization code that should turn missing input into a defined value"],"exampleFix":"// before\nquery.deploymentNameLike(\"%\" + searchTerm + \"%\");\n// after\nif (searchTerm != null) {\n    query.deploymentNameLike(\"%\" + searchTerm + \"%\");\n}","handlingStrategy":"validation","validationCode":"if (nameLike == null) { throw new IllegalArgumentException(\"nameLike must not be null\"); }\nrepositoryService.createDeploymentQuery().deploymentNameLike(nameLike)...","typeGuard":"boolean hasText(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try {\n    repositoryService.createDeploymentQuery().deploymentNameLike(pattern).list();\n} catch (ActivitiIllegalArgumentException e) {\n    log.error(\"nameLike pattern was null\", e);\n}","preventionTips":["Build like-patterns only from non-null inputs","Sanitize/normalize search terms before pattern construction","Skip the filter call when the term is absent"],"tags":["java","activiti","null-argument","query"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}