{"record":{"id":"e307ac8deaab4eca","repo":"flowable/flowable-engine","slug":"deploymentcategoryexclude-is-null","errorCode":null,"errorMessage":"deploymentCategoryExclude is null","messagePattern":"deploymentCategoryExclude is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDeploymentQueryImpl.java","lineNumber":105,"sourceCode":"            throw new FlowableIllegalArgumentException(\"deploymentNameLike is null\");\n        }\n        this.nameLike = nameLike;\n        return this;\n    }\n\n    @Override\n    public AppDeploymentQueryImpl deploymentCategory(String deploymentCategory) {\n        if (deploymentCategory == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentCategory is null\");\n        }\n        this.category = deploymentCategory;\n        return this;\n    }\n\n    @Override\n    public AppDeploymentQueryImpl deploymentCategoryNotEquals(String deploymentCategoryNotEquals) {\n        if (deploymentCategoryNotEquals == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentCategoryExclude is null\");\n        }\n        this.categoryNotEquals = deploymentCategoryNotEquals;\n        return this;\n    }\n    \n    @Override\n    public AppDeploymentQueryImpl deploymentKey(String deploymentKey) {\n        if (deploymentKey == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentKey is null\");\n        }\n        this.key = deploymentKey;\n        return this;\n    }\n\n    @Override\n    public AppDeploymentQueryImpl deploymentTenantId(String tenantId) {\n        if (tenantId == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentTenantId is null\");","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/repository/AppDeploymentQueryImpl.java#L87-L123","documentation":"AppDeploymentQueryImpl.deploymentCategoryNotEquals() throws FlowableIllegalArgumentException when the exclusion category argument is null (message: 'deploymentCategoryExclude is null'). A null exclusion is meaningless, so the fluent API rejects it.","triggerScenarios":"Calling deploymentCategoryNotEquals(null) — e.g. an 'exclude category' UI option left unselected and bound to null.","commonSituations":"Optional exclusion filter in query-assembler code called unconditionally; refactors that renamed a constant to null/default.","solutions":["Only call deploymentCategoryNotEquals when the value is non-null.","Default the exclusion to a sentinel you never deploy (e.g. \"__none__\") if you always want the call, though skipping is cleaner.","Audit query-builder helpers so each optional filter is guarded consistently.","Catch FlowableIllegalArgumentException and convert to a client error."],"exampleFix":"// before\nquery.deploymentCategoryNotEquals(excludeCategory); // may be null\n// after\nif (excludeCategory != null) query.deploymentCategoryNotEquals(excludeCategory);","handlingStrategy":"validation","validationCode":"if (excludeCategory != null) query.deploymentCategoryNotEquals(excludeCategory);","typeGuard":null,"tryCatchPattern":"try {\n    query.deploymentCategoryNotEquals(exclude);\n} catch (org.flowable.common.engine.api.FlowableIllegalArgumentException e) {\n    throw new javax.ws.rs.BadRequestException(\"excludeCategory must not be null\", e);\n}","preventionTips":["Treat exclusion filters like any other optional filter: null means skip","Bind UI 'exclude' options to Optional rather than raw nullable values","Apply guards uniformly across all query filter calls"],"tags":["java","flowable","query","null-check"],"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"}