{"record":{"id":"2609c66b12f2becc","repo":"flowable/flowable-engine","slug":"deploymentcategoryexclude-is-null-2609c6","errorCode":null,"errorMessage":"deploymentCategoryExclude is null","messagePattern":"deploymentCategoryExclude is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CmmnDeploymentQueryImpl.java","lineNumber":108,"sourceCode":"            throw new FlowableIllegalArgumentException(\"deploymentNameLike is null\");\n        }\n        this.nameLike = nameLike;\n        return this;\n    }\n\n    @Override\n    public CmmnDeploymentQueryImpl 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 CmmnDeploymentQueryImpl 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 CmmnDeploymentQueryImpl 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 CmmnDeploymentQueryImpl deploymentTenantId(String tenantId) {\n        if (tenantId == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentTenantId is null\");","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/repository/CmmnDeploymentQueryImpl.java#L90-L126","documentation":"Thrown by CmmnDeploymentQueryImpl.deploymentCategoryNotEquals(null). The exclusion filter must be a non-null string; null would make the NOT-EQUALS condition undefined, so the setter rejects it immediately with a FlowableIllegalArgumentException.","triggerScenarios":"Calling deploymentCategoryNotEquals(null) on a CmmnDeploymentQuery, e.g. when the excluded category is read from config or a request parameter that is absent.","commonSituations":"Dynamic query builders that always call all filter setters; refactoring that renamed a variable and left it unset; optional REST filter parameters passed straight through.","solutions":["Pass a non-null category string to deploymentCategoryNotEquals()","Conditionally call the setter only when an exclusion is actually desired","Use deploymentCategory() instead if the intent was an inclusion filter"],"exampleFix":"// before\nquery.deploymentCategoryNotEquals(excludeCategory); // may be null\n// after\nif (excludeCategory != null) {\n    query.deploymentCategoryNotEquals(excludeCategory);\n}","handlingStrategy":"validation","validationCode":"Objects.requireNonNull(excludeCategory, \"deploymentCategoryExclude must not be null\");\nquery.deploymentCategoryNotEquals(excludeCategory);","typeGuard":"boolean hasExclude = excludeCategory != null && !excludeCategory.isEmpty();","tryCatchPattern":"try {\n    query.deploymentCategoryNotEquals(excludeCategory);\n} catch (FlowableIllegalArgumentException e) {\n    // log and skip this filter\n}","preventionTips":["Guard optional exclusion filters with null checks","Prefer building the query conditionally over passing nulls","Document that query setters are strict about nulls"],"tags":["java","flowable","null-check","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-18T11:17:12.947Z"}