{"record":{"id":"384c6029727cafbb","repo":"flowable/flowable-engine","slug":"deploymentcategoryexclude-is-null-384c60","errorCode":null,"errorMessage":"deploymentCategoryExclude is null","messagePattern":"deploymentCategoryExclude is null","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventDeploymentQueryImpl.java","lineNumber":99,"sourceCode":"            throw new FlowableIllegalArgumentException(\"deploymentNameLike is null\");\n        }\n        this.nameLike = nameLike;\n        return this;\n    }\n\n    @Override\n    public EventDeploymentQueryImpl 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 EventDeploymentQueryImpl 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 EventDeploymentQueryImpl parentDeploymentId(String parentDeploymentId) {\n        if (parentDeploymentId == null) {\n            throw new FlowableIllegalArgumentException(\"parentDeploymentId is null\");\n        }\n        this.parentDeploymentId = parentDeploymentId;\n        return this;\n    }\n\n    @Override\n    public EventDeploymentQueryImpl parentDeploymentIdLike(String parentDeploymentIdLike) {\n        if (parentDeploymentIdLike == null) {\n            throw new FlowableIllegalArgumentException(\"parentDeploymentIdLike is null\");","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-event-registry/src/main/java/org/flowable/eventregistry/impl/EventDeploymentQueryImpl.java#L81-L117","documentation":"EventDeploymentQueryImpl.deploymentCategoryNotEquals excludes deployments whose category equals the given value. It throws FlowableIllegalArgumentException when the argument is null; the message says 'deploymentCategoryExclude is null' reflecting the internal field name categoryNotEquals.","triggerScenarios":"Calling deploymentCategoryNotEquals(null), usually when the category to exclude comes from an optional config value or skip-list entry that is missing.","commonSituations":"Exclusion lists built from config with missing entries, copy-paste from deploymentCategory() with an unset variable, dynamic filter builders forwarding nulls.","solutions":["Pass a non-null category string to exclude","Skip the exclusion filter when nothing should be excluded","Default the exclusion variable to a sentinel non-null value or drop the filter"],"exampleFix":"// before\nquery.deploymentCategoryNotEquals(excludedCategory); // may be null\n// after\nif (excludedCategory != null) {\n    query.deploymentCategoryNotEquals(excludedCategory);\n}","handlingStrategy":"validation","validationCode":"if (excludedCategory == null || excludedCategory.isEmpty()) { throw new IllegalArgumentException(\"excluded category required for deploymentCategoryNotEquals()\"); }","typeGuard":"boolean hasText(String s) { return s != null && !s.trim().isEmpty(); }","tryCatchPattern":"try { q.deploymentCategoryNotEquals(excluded).list(); } catch (FlowableIllegalArgumentException e) { log.warn(\"exclusion null, skipping filter\"); }","preventionTips":["Filter null/blank entries out of exclusion lists before applying them to the query","Treat exclusion filters as optional: apply only when a value exists","Keep exclusion lists in validated configuration, not ad-hoc maps"],"tags":["flowable","query","null-argument","deployment"],"backgroundTag":"null-argument","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T16:30:33.424Z"}