{"record":{"id":"329feefb9cb5a7e2","repo":"flowable/flowable-engine","slug":"deploymentcategoryexclude-is-null-329fee","errorCode":null,"errorMessage":"deploymentCategoryExclude is null","messagePattern":"deploymentCategoryExclude is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/DeploymentQueryImpl.java","lineNumber":123,"sourceCode":"            throw new FlowableIllegalArgumentException(\"deploymentCategory is null\");\n        }\n        this.category = deploymentCategory;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl deploymentCategoryLike(String categoryLike) {\n        if (categoryLike == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentCategoryLike is null\");\n        }\n        this.categoryLike = categoryLike;\n        return this;\n    }\n\n    @Override\n    public DeploymentQueryImpl 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 DeploymentQueryImpl 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 DeploymentQueryImpl deploymentKeyLike(String deploymentKeyLike) {\n        if (deploymentKeyLike == null) {\n            throw new FlowableIllegalArgumentException(\"deploymentKeyLike is null\");","sourceCodeStart":105,"sourceCodeEnd":141,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/DeploymentQueryImpl.java#L105-L141","documentation":"DeploymentQueryImpl.deploymentCategoryNotEquals(String) throws FlowableIllegalArgumentException when the argument is null. This filter excludes deployments whose category equals the given value; since excluding null is meaningless, Flowable rejects a null at builder time. The exception message uses the internal name 'deploymentCategoryExclude'.","triggerScenarios":"repositoryService.createDeploymentQuery().deploymentCategoryNotEquals(null), typically when an exclusion category is optional and null is passed through unconditionally.","commonSituations":"UI 'exclude category' dropdowns with no selection mapped to null instead of skipping the call; configuration keys for an excluded category that are absent.","solutions":["Pass a concrete category string to exclude.","Guard the call: if (excludeCategory != null) query.deploymentCategoryNotEquals(excludeCategory).","If no exclusion is wanted, simply do not call the method."],"exampleFix":"// before\nquery.deploymentCategoryNotEquals(excludeCategory); // throws when null\n// after\nif (excludeCategory != null) {\n    query.deploymentCategoryNotEquals(excludeCategory);\n}","handlingStrategy":"validation","validationCode":"if (excludeCategory != null && !excludeCategory.isEmpty()) {\n    query.deploymentCategoryNotEquals(excludeCategory);\n}","typeGuard":"boolean hasExcludeCategory(String category) { return category != null && !category.isEmpty(); }","tryCatchPattern":"try {\n    query.deploymentCategoryNotEquals(excludeCategory);\n} catch (FlowableIllegalArgumentException e) {\n    log.warn(\"Null exclusion category ignored\", e);\n}","preventionTips":["Map 'no selection' in UIs to skipping the filter, not passing null","Only call exclusion filters when a real value exists","Document that exclusion filters require non-null values"],"tags":["flowable","query-builder","null-argument","deployment-category"],"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"}