{"record":{"id":"08ab1dda4bf978b8","repo":"flowable/flowable-engine","slug":"name-is-null","errorCode":null,"errorMessage":"name is null","messagePattern":"name is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDefinitionQueryImpl.java","lineNumber":113,"sourceCode":"            throw new FlowableIllegalArgumentException(\"categoryLike is null\");\n        }\n        this.categoryLike = categoryLike;\n        return this;\n    }\n\n    @Override\n    public AppDefinitionQueryImpl appDefinitionCategoryNotEquals(String categoryNotEquals) {\n        if (categoryNotEquals == null) {\n            throw new FlowableIllegalArgumentException(\"categoryNotEquals is null\");\n        }\n        this.categoryNotEquals = categoryNotEquals;\n        return this;\n    }\n\n    @Override\n    public AppDefinitionQueryImpl appDefinitionName(String name) {\n        if (name == null) {\n            throw new FlowableIllegalArgumentException(\"name is null\");\n        }\n        this.name = name;\n        return this;\n    }\n\n    @Override\n    public AppDefinitionQueryImpl appDefinitionNameLike(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 AppDefinitionQueryImpl deploymentId(String deploymentId) {\n        if (deploymentId == null) {\n            throw new FlowableIllegalArgumentException(\"id is null\");","sourceCodeStart":95,"sourceCodeEnd":131,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDefinitionQueryImpl.java#L95-L131","documentation":"appDefinitionName(null) throws FlowableIllegalArgumentException because AppDefinitionQueryImpl stores the name for an exact-match SQL equality predicate; null is rejected eagerly at builder time. The message 'name is null' identifies which criterion failed.","triggerScenarios":"Calling appDefinitionName(name) with a null String — usually an unset variable from optional input, an unpopulated DTO field, or a lookup that returned null.","commonSituations":"Search-form field left empty and bound straight to the query; JSON body missing the 'name' property (Jackson leaves it null); refactor changed a default value to null.","solutions":["Guard with a null check and only apply the name criterion when present","Coerce empty/absent input to a defined default or skip the filter","Catch FlowableIllegalArgumentException in the controller and return 400"],"exampleFix":"// before\nquery.appDefinitionName(name);\n// after\nif (name != null) {\n    query.appDefinitionName(name);\n}","handlingStrategy":"validation","validationCode":"if (name != null) {\n    query.appDefinitionName(name);\n}","typeGuard":"boolean isApplicable(String v) { return v != null && !v.isEmpty(); }","tryCatchPattern":"try {\n    query.appDefinitionName(name);\n} catch (FlowableIllegalArgumentException e) {\n    throw new ResponseStatusException(HttpStatus.BAD_REQUEST, e.getMessage(), e);\n}","preventionTips":["Null-check name before building the query","Populate DTO defaults so search fields are never null","Catch FlowableIllegalArgumentException early in controllers and convert to 400"],"tags":["flowable","null-check","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"}